mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-20 02:08:13 +00:00
use WIN_StringToUTF8W macro instead of WIN_StringToUTF8, where needed:
i.e. where the string is known guaranteed to be WCHAR*, in: - SDL_dinputjoystick.c (WIN_IsXInputDevice): VARIANT->var is BSTR (WCHAR*) - SDL_rawinputjoystick.c (RAWINPUT_AddDevice): string is WCHAR* - SDL_windows_gaming_input.c (IEventHandler_CRawGameControllerVtbl_InvokeAdded): string is WCHAR* There should be more of these..
This commit is contained in:
@@ -315,7 +315,7 @@ WIN_IsXInputDevice(const TCHAR *name, const GUID* pGuidProductFromDirectInput)
|
||||
// Check if the device ID contains "IG_". If it does, then it's an XInput device
|
||||
// This information can not be found from DirectInput
|
||||
if (SDL_wcsstr(var.bstrVal, L"IG_")) {
|
||||
char *bstrVal = WIN_StringToUTF8(var.bstrVal);
|
||||
char *bstrVal = WIN_StringToUTF8W(var.bstrVal);
|
||||
|
||||
// If it does, then get the VID/PID from var.bstrVal
|
||||
DWORD dwPid = 0, dwVid = 0, dwVidPid;
|
||||
|
Reference in New Issue
Block a user