|
1 | 1 | #include "FFPlatform_private.h" |
2 | 2 | #include "util/stringUtils.h" |
| 3 | +#include "util/windows/unicode.h" |
3 | 4 |
|
4 | 5 | #include <Windows.h> |
5 | 6 | #include <shlobj.h> |
6 | | - |
7 | | -#include "util/windows/unicode.h" |
8 | | - |
9 | 7 | static void getHomeDir(FFPlatform* platform) |
10 | 8 | { |
11 | 9 | PWSTR pPath; |
@@ -41,8 +39,7 @@ static void platformPathAddKnownFolder(FFlist* dirs, REFKNOWNFOLDERID folderId) |
41 | 39 | if(SUCCEEDED(SHGetKnownFolderPath(folderId, 0, NULL, &pPath))) |
42 | 40 | { |
43 | 41 | FFstrbuf* buffer = (FFstrbuf*) ffListAdd(dirs); |
44 | | - ffStrbufInit(buffer); |
45 | | - ffStrbufSetWS(buffer, pPath); |
| 42 | + ffStrbufInitWS(buffer, pPath); |
46 | 43 | ffStrbufReplaceAllC(buffer, '\\', '/'); |
47 | 44 | ffStrbufEnsureEndsWithC(buffer, '/'); |
48 | 45 | FF_PLATFORM_PATH_UNIQUE(dirs, buffer); |
@@ -159,7 +156,7 @@ static void getSystemReleaseAndVersion(FFPlatform* platform) |
159 | 156 |
|
160 | 157 | DWORD ubr; |
161 | 158 | bufSize = sizeof(ubr); |
162 | | - if(RegGetValueA(hKey, NULL, "UBR", RRF_RT_REG_DWORD, NULL, &ubr, &bufSize) != ERROR_SUCCESS || bufSize != sizeof(ubr)) |
| 159 | + if(RegGetValueW(hKey, NULL, L"UBR", RRF_RT_REG_DWORD, NULL, &ubr, &bufSize) != ERROR_SUCCESS || bufSize != sizeof(ubr)) |
163 | 160 | ubr = 0; |
164 | 161 |
|
165 | 162 | ffStrbufAppendF(&platform->systemRelease, "%s.%s.%u", currentVersion, currentBuildNumber, (unsigned)ubr); |
|
0 commit comments