Use WGI instead of XInput for Windows 10 UWP apps

Fixes https://github.com/libsdl-org/SDL/issues/5017
This commit is contained in:
Sam Lantinga
2021-11-27 10:24:32 -08:00
parent e04a0221e3
commit 110e4e1334
4 changed files with 111 additions and 75 deletions

View File

@@ -201,8 +201,13 @@ typedef unsigned int uintptr_t;
#define SDL_HAPTIC_DISABLED 1
#else
#define SDL_JOYSTICK_VIRTUAL 1
#if (NTDDI_VERSION >= NTDDI_WIN10)
#define SDL_JOYSTICK_WGI 1
#define SDL_HAPTIC_DISABLED 1
#else
#define SDL_JOYSTICK_XINPUT 1
#define SDL_HAPTIC_XINPUT 1
#endif /* WIN10 */
#endif
/* WinRT doesn't have HIDAPI available */