mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
gui: get special folder in unicode
This commit is contained in:
parent
1c5d225853
commit
bb6ca65f98
1 changed files with 3 additions and 3 deletions
|
|
@ -1118,14 +1118,14 @@ void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
|
fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
|
||||||
{
|
{
|
||||||
char pszPath[MAX_PATH] = "";
|
WCHAR pszPath[MAX_PATH] = L"";
|
||||||
|
|
||||||
if(SHGetSpecialFolderPathA(nullptr, pszPath, nFolder, fCreate))
|
if(SHGetSpecialFolderPathW(nullptr, pszPath, nFolder, fCreate))
|
||||||
{
|
{
|
||||||
return fs::path(pszPath);
|
return fs::path(pszPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
LogPrintf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n");
|
LogPrintf("SHGetSpecialFolderPathW() failed, could not obtain requested path.\n");
|
||||||
return fs::path("");
|
return fs::path("");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue