Commit 5427f4861bfd7cb20c1950fa475879a27d8d169b

Sam Lantinga 2021-02-11T17:28:07

Added support for trigger rumble for all Microsoft Xbox One controllers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/joystick/hidapi/SDL_hidapi_xboxone.c b/src/joystick/hidapi/SDL_hidapi_xboxone.c
index 563a0fa..3b65979 100644
--- a/src/joystick/hidapi/SDL_hidapi_xboxone.c
+++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c
@@ -138,7 +138,8 @@ ControllerHasPaddles(Uint16 vendor_id, Uint16 product_id)
 static SDL_bool
 ControllerHasTriggerRumble(Uint16 vendor_id, Uint16 product_id)
 {
-    return SDL_IsJoystickXboxOneElite(vendor_id, product_id);
+    // All the Microsoft Xbox One controllers have trigger rumble
+    return (vendor_id == USB_VENDOR_MICROSOFT);
 }
 
 static SDL_bool