From a6cbe0ab87f431d36873461fe676d822d2ed13b8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 27 Nov 2021 10:58:12 -0800 Subject: [PATCH] Controllers are always centered at zero using XInput and WGI --- src/joystick/SDL_joystick.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index e94a8aa3e..cfcad6168 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -343,6 +343,9 @@ SDL_JoystickGetDevicePlayerIndex(int device_index) static SDL_bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick) { +#ifdef __WINRT__ + return SDL_TRUE; +#else static Uint32 zero_centered_joysticks[] = { MAKE_VIDPID(0x0e8f, 0x3013), /* HuiJia SNES USB adapter */ MAKE_VIDPID(0x05a0, 0x3232), /* 8Bitdo Zero Gamepad */ @@ -365,6 +368,7 @@ SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick) } } return SDL_FALSE; +#endif /* __WINRT__ */ } /*