mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +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:
@@ -197,7 +197,7 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde
|
||||
if (SUCCEEDED(hr)) {
|
||||
PCWSTR string = WindowsGetStringRawBufferFunc(hString, NULL);
|
||||
if (string) {
|
||||
name = WIN_StringToUTF8(string);
|
||||
name = WIN_StringToUTF8W(string);
|
||||
}
|
||||
WindowsDeleteStringFunc(hString);
|
||||
}
|
||||
|
Reference in New Issue
Block a user