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

@@ -741,7 +741,7 @@ static bool MEDIAFOUNDATION_OpenDevice(SDL_Camera *device, const SDL_CameraSpec
SDL_Log("CAMERA: opening device with symlink of '%s'", utf8symlink);
#endif
wstrsymlink = WIN_UTF8ToString(utf8symlink);
wstrsymlink = WIN_UTF8ToStringW(utf8symlink);
if (!wstrsymlink) {
goto failed;
}
@@ -901,7 +901,7 @@ static char *QueryActivationObjectString(IMFActivate *activation, const GUID *pg
return NULL;
}
char *utf8str = WIN_StringToUTF8(wstr);
char *utf8str = WIN_StringToUTF8W(wstr);
CoTaskMemFree(wstr);
return utf8str;
}