aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorChun Kuan Lee <ken2812221@gmail.com>2018-07-31 23:03:52 +0800
committerChun Kuan Lee <ken2812221@gmail.com>2018-08-04 02:47:58 +0800
commitbb6ca65f9890e8280ace32de5a37774e14705859 (patch)
tree3e4de89a24a140af691ce04c414e6e14fe49fc61 /src/util.cpp
parent1c5d22585384c8bb05a27a04eab5c57b31d623fb (diff)
gui: get special folder in unicode
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp6
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