diff options
author | Chun Kuan Lee <ken2812221@gmail.com> | 2018-07-31 23:03:52 +0800 |
---|---|---|
committer | Chun Kuan Lee <ken2812221@gmail.com> | 2018-08-04 02:47:58 +0800 |
commit | bb6ca65f9890e8280ace32de5a37774e14705859 (patch) | |
tree | 3e4de89a24a140af691ce04c414e6e14fe49fc61 /src/util.cpp | |
parent | 1c5d22585384c8bb05a27a04eab5c57b31d623fb (diff) |
gui: get special folder in unicode
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp index 2f81f50a71..c2c93d966a 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1118,14 +1118,14 @@ void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) { #ifdef WIN32 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); } - LogPrintf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n"); + LogPrintf("SHGetSpecialFolderPathW() failed, could not obtain requested path.\n"); return fs::path(""); } #endif |