mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-21 14:55:39 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user