Skip to content

Commit bb6ca65

Browse files
committed
gui: get special folder in unicode
1 parent 1c5d225 commit bb6ca65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,14 +1118,14 @@ void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) {
11181118
#ifdef WIN32
11191119
fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
11201120
{
1121-
char pszPath[MAX_PATH] = "";
1121+
WCHAR pszPath[MAX_PATH] = L"";
11221122

1123-
if(SHGetSpecialFolderPathA(nullptr, pszPath, nFolder, fCreate))
1123+
if(SHGetSpecialFolderPathW(nullptr, pszPath, nFolder, fCreate))
11241124
{
11251125
return fs::path(pszPath);
11261126
}
11271127

1128-
LogPrintf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n");
1128+
LogPrintf("SHGetSpecialFolderPathW() failed, could not obtain requested path.\n");
11291129
return fs::path("");
11301130
}
11311131
#endif

0 commit comments

Comments
 (0)