mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-02 07:58:30 +00:00
RAWINPUT_InitWindowsGamingInput: change pNamespace from LPTSTR to PCWSTR
because WindowsCreateStringReference specifically accepts const WCHAR * - WGI_JoystickInit(): ditto. cf. bug #5435.
This commit is contained in:
@@ -546,7 +546,7 @@ RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx)
|
|||||||
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)GetProcAddress(hModule, "WindowsCreateStringReference");
|
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)GetProcAddress(hModule, "WindowsCreateStringReference");
|
||||||
RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)GetProcAddress(hModule, "RoGetActivationFactory");
|
RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)GetProcAddress(hModule, "RoGetActivationFactory");
|
||||||
if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) {
|
if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) {
|
||||||
LPTSTR pNamespace = L"Windows.Gaming.Input.Gamepad";
|
PCWSTR pNamespace = L"Windows.Gaming.Input.Gamepad";
|
||||||
HSTRING_HEADER hNamespaceStringHeader;
|
HSTRING_HEADER hNamespaceStringHeader;
|
||||||
HSTRING hNamespaceString;
|
HSTRING hNamespaceString;
|
||||||
|
|
||||||
|
@@ -372,7 +372,7 @@ WGI_JoystickInit(void)
|
|||||||
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)GetProcAddress(hModule, "WindowsCreateStringReference");
|
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)GetProcAddress(hModule, "WindowsCreateStringReference");
|
||||||
RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)GetProcAddress(hModule, "RoGetActivationFactory");
|
RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)GetProcAddress(hModule, "RoGetActivationFactory");
|
||||||
if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) {
|
if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) {
|
||||||
LPTSTR pNamespace;
|
PCWSTR pNamespace;
|
||||||
HSTRING_HEADER hNamespaceStringHeader;
|
HSTRING_HEADER hNamespaceStringHeader;
|
||||||
HSTRING hNamespaceString;
|
HSTRING hNamespaceString;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user