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 authored and Sam Lantinga committed 2025-05-08 07:22:11 -07:00
1 parent d9e58baa6d
commit 37b86a6d2f
8 files changed
+24 -24

No files matched your search

@@ -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;
}