Ignore Xbox One S gamepads with older firmware in HIDAPI
authorCameron Gutman <aicommander@gmail.com>
Tue, 30 Apr 2019 20:37:49 -0700
changeset 12769096f2f3c4bdc
parent 12768 dc71b221079c
child 12770 74ba5a85d682
Ignore Xbox One S gamepads with older firmware in HIDAPI

This older firmware had a different HID report style that we don't support.
src/joystick/hidapi/SDL_hidapi_xbox360.c
     1.1 --- a/src/joystick/hidapi/SDL_hidapi_xbox360.c	Sat Jun 08 10:23:52 2019 -0700
     1.2 +++ b/src/joystick/hidapi/SDL_hidapi_xbox360.c	Tue Apr 30 20:37:49 2019 -0700
     1.3 @@ -255,6 +255,10 @@
     1.4          /* This is the Steam Virtual Gamepad, which isn't supported by this driver */
     1.5          return SDL_FALSE;
     1.6      }
     1.7 +    if (vendor_id == 0x045e && product_id == 0x02e0) {
     1.8 +        /* This is the old Bluetooth Xbox One S firmware, which isn't supported by this driver */
     1.9 +        return SDL_FALSE;
    1.10 +    }
    1.11      return SDL_IsJoystickXbox360(vendor_id, product_id) || SDL_IsJoystickXboxOne(vendor_id, product_id);
    1.12  #else
    1.13      return SDL_IsJoystickXbox360(vendor_id, product_id);