mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-23 11:38:28 +00:00
attempt to fix uwp build
This commit is contained in:
@@ -62,6 +62,7 @@ typedef struct WindowsGamingInputGamepadState WindowsGamingInputGamepadState;
|
||||
#define GamepadButtons_GUIDE 0x40000000
|
||||
#define COBJMACROS
|
||||
#include "windows.gaming.input.h"
|
||||
#include <roapi.h>
|
||||
#endif
|
||||
|
||||
#if defined(SDL_JOYSTICK_RAWINPUT_XINPUT) || defined(SDL_JOYSTICK_RAWINPUT_WGI)
|
||||
@@ -576,8 +577,13 @@ RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx)
|
||||
typedef HRESULT (WINAPI *WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING* string);
|
||||
typedef HRESULT (WINAPI *RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void** factory);
|
||||
|
||||
#ifdef __WINRT__
|
||||
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = WindowsCreateStringReference;
|
||||
RoGetActivationFactory_t RoGetActivationFactoryFunc = RoGetActivationFactory;
|
||||
#else
|
||||
WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)WIN_LoadComBaseFunction("WindowsCreateStringReference");
|
||||
RoGetActivationFactory_t RoGetActivationFactoryFunc = (RoGetActivationFactory_t)WIN_LoadComBaseFunction("RoGetActivationFactory");
|
||||
#endif
|
||||
if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) {
|
||||
PCWSTR pNamespace = L"Windows.Gaming.Input.Gamepad";
|
||||
HSTRING_HEADER hNamespaceStringHeader;
|
||||
|
Reference in New Issue
Block a user