Pomme/src/Platform/Windows/PommeWindows.cpp

28 lines
511 B
C++
Raw Permalink Normal View History

2020-12-25 09:00:26 +00:00
#undef NOUSER
2023-09-17 19:26:05 +00:00
#include "PommeDebug.h"
2020-11-11 20:06:52 +00:00
#include "Platform/Windows/PommeWindows.h"
#include <shlobj.h>
std::filesystem::path Pomme::Platform::Windows::GetPreferencesFolder()
{
2023-09-17 19:26:05 +00:00
PWSTR wpath = nullptr;
HRESULT result = SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, nullptr, &wpath);
std::filesystem::path path = "";
if (result == S_OK)
{
path = std::filesystem::path(wpath);
}
2020-11-11 20:06:52 +00:00
CoTaskMemFree(static_cast<void*>(wpath));
return path;
}
void Pomme::Platform::Windows::SysBeep()
{
MessageBeep(0);
}