mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-06 01:46:25 +00:00
Re-added WinRT support until we're sure that it's no longer being used
This commit is contained in:
@@ -46,7 +46,11 @@ static char *s_arrXInputDevicePath[XUSER_MAX_COUNT];
|
||||
static SDL_bool
|
||||
SDL_XInputUseOldJoystickMapping()
|
||||
{
|
||||
#if defined(__XBOXONE__) || defined(__XBOXSERIES__)
|
||||
#ifdef __WINRT__
|
||||
/* TODO: remove this __WINRT__ block, but only after integrating with UWP/WinRT's HID API */
|
||||
/* FIXME: Why are Win8/10 different here? -flibit */
|
||||
return (NTDDI_VERSION < NTDDI_WIN10);
|
||||
#elif defined(__XBOXONE__) || defined(__XBOXSERIES__)
|
||||
return SDL_FALSE;
|
||||
#else
|
||||
static int s_XInputUseOldJoystickMapping = -1;
|
||||
@@ -129,7 +133,7 @@ GetXInputName(const Uint8 userid, BYTE SubType)
|
||||
static void
|
||||
GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion)
|
||||
{
|
||||
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* TODO: remove this ifndef __WINRT__ block, but only after integrating with UWP/WinRT's HID API */
|
||||
#if !defined(__WINRT__) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* TODO: remove this ifndef __WINRT__ block, but only after integrating with UWP/WinRT's HID API */
|
||||
PRAWINPUTDEVICELIST devices = NULL;
|
||||
UINT i, j, device_count = 0;
|
||||
|
||||
@@ -227,7 +231,7 @@ GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion)
|
||||
}
|
||||
}
|
||||
SDL_free(devices);
|
||||
#endif
|
||||
#endif /* !__WINRT__ */
|
||||
|
||||
/* The device wasn't in the raw HID device list, it's probably Bluetooth */
|
||||
*pVID = 0x045e; /* Microsoft */
|
||||
|
Reference in New Issue
Block a user