Browse Source

Fixed detection of the Steam Virtual Gamepad on macOS

Sam Lantinga 1 year ago
parent
commit
5fcd70578b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/joystick/hidapi/SDL_hidapi_xbox360.c

+ 2 - 1
src/joystick/hidapi/SDL_hidapi_xbox360.c

@@ -81,7 +81,8 @@ static SDL_bool HIDAPI_DriverXbox360_IsSupportedDevice(SDL_HIDAPI_Device *device
         return SDL_FALSE;
     }
 #if defined(__MACOS__) || defined(__WIN32__)
-    if (vendor_id == USB_VENDOR_MICROSOFT && product_id == 0x028e && version == 1) {
+    if (vendor_id == USB_VENDOR_MICROSOFT && product_id == 0x028e &&
+        (version == 0 || version == 1)) {
         /* This is the Steam Virtual Gamepad, which isn't supported by this driver */
         return SDL_FALSE;
     }