From 398d2764c70e3c37d3fb9b3d763b13fa9dec1787 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 4 Jan 2021 01:23:50 +0300 Subject: [PATCH] RAWINPUT_InitWindowsGamingInput: change pNamespace from LPTSTR to PCWSTR because WindowsCreateStringReference specifically accepts const WCHAR * - WGI_JoystickInit(): ditto. cf. bug #5435. --- src/joystick/windows/SDL_rawinputjoystick.c | 2 +- src/joystick/windows/SDL_windows_gaming_input.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c index cb29dd57f..7b0c987e3 100644 --- a/src/joystick/windows/SDL_rawinputjoystick.c +++ b/src/joystick/windows/SDL_rawinputjoystick.c @@ -546,7 +546,7 @@ RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)GetProcAddress(hModule, "WindowsCreateStringReference"); RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)GetProcAddress(hModule, "RoGetActivationFactory"); if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) { - LPTSTR pNamespace = L"Windows.Gaming.Input.Gamepad"; + PCWSTR pNamespace = L"Windows.Gaming.Input.Gamepad"; HSTRING_HEADER hNamespaceStringHeader; HSTRING hNamespaceString; diff --git a/src/joystick/windows/SDL_windows_gaming_input.c b/src/joystick/windows/SDL_windows_gaming_input.c index 787ea4c0f..bf522b4c8 100644 --- a/src/joystick/windows/SDL_windows_gaming_input.c +++ b/src/joystick/windows/SDL_windows_gaming_input.c @@ -372,7 +372,7 @@ WGI_JoystickInit(void) WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)GetProcAddress(hModule, "WindowsCreateStringReference"); RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)GetProcAddress(hModule, "RoGetActivationFactory"); if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) { - LPTSTR pNamespace; + PCWSTR pNamespace; HSTRING_HEADER hNamespaceStringHeader; HSTRING hNamespaceString;