windows: fix Unicode function and type inconsistencies

The surrounding code in all of these instances expects the Unicode
variants. Previously, this code mixed Unicode and ANSI/ASCII calls if
`UNICODE` was undefined, which caused type and logic errors. Explicitly
spelling out the W removes any reliance on that macro.
This commit is contained in:
nmlgc
2025-04-12 20:04:27 +02:00
committed by Sam Lantinga
parent d9e58baa6d
commit 37b86a6d2f
8 changed files with 24 additions and 24 deletions

View File

@@ -181,7 +181,7 @@ char *SDL_SYS_GetPrefPath(const char *org, const char *app)
char *SDL_SYS_GetUserFolder(SDL_Folder folder)
{
typedef HRESULT (WINAPI *pfnSHGetKnownFolderPath)(REFGUID /* REFKNOWNFOLDERID */, DWORD, HANDLE, PWSTR*);
HMODULE lib = LoadLibrary(L"Shell32.dll");
HMODULE lib = LoadLibraryW(L"Shell32.dll");
pfnSHGetKnownFolderPath pSHGetKnownFolderPath = NULL;
char *result = NULL;