From a9ac9e3865ba69b2c6dbe2d07ca666abd95ed703 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 16 Nov 2019 19:58:29 -0800 Subject: [PATCH] Don't try to use this driver with the Xbox One S in Bluetooth mode on Linux --- src/joystick/hidapi/SDL_hidapi_xboxone.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/joystick/hidapi/SDL_hidapi_xboxone.c b/src/joystick/hidapi/SDL_hidapi_xboxone.c index 42b809614..0e97fe99d 100644 --- a/src/joystick/hidapi/SDL_hidapi_xboxone.c +++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c @@ -133,6 +133,13 @@ typedef struct { static SDL_bool HIDAPI_DriverXboxOne_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, const char *name) { +#ifdef __LINUX__ + /* Check to see if it's the Xbox One S in Bluetooth mode */ + if (vendor_id == 0x045e && product_id == 0x02fd) { + /* We can't do rumble on this device, hid_write() fails, so don't try to open it here */ + return SDL_FALSE; + } +#endif return SDL_IsJoystickXboxOne(vendor_id, product_id); }