Commit 09aed1020b3693981ec0471a3bd77714542a6eb8

Sam Lantinga 2022-01-16T09:23:58

Don't send output reports to the Victrix Pro FS v2 It'll hang on reboot if it gets output reports, and it doesn't have functionality that requires them, so skip it.

diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c
index 1295412..8e7699f 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps4.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps4.c
@@ -177,6 +177,12 @@ static SDL_bool HIDAPI_DriverPS4_CanRumble(Uint16 vendor_id, Uint16 product_id)
         (product_id == USB_PRODUCT_RAZER_PANTHERA || product_id == USB_PRODUCT_RAZER_PANTHERA_EVO)) {
         return SDL_FALSE;
     }
+
+    /* The Victrix Pro FS v2 will hang on reboot if we send output reports */
+    if (vendor_id == USB_VENDOR_PDP && product_id == USB_PRODUCT_VICTRIX_FS_PRO_V2) {
+        return SDL_FALSE;
+    }
+
     return SDL_TRUE;
 }
 
diff --git a/src/joystick/usb_ids.h b/src/joystick/usb_ids.h
index 5b2648e..97f37b0 100644
--- a/src/joystick/usb_ids.h
+++ b/src/joystick/usb_ids.h
@@ -54,6 +54,7 @@
 #define USB_PRODUCT_SONY_DS4_DONGLE                         0x0ba0
 #define USB_PRODUCT_SONY_DS4_SLIM                           0x09cc
 #define USB_PRODUCT_SONY_DS5                                0x0ce6
+#define USB_PRODUCT_VICTRIX_FS_PRO_V2                       0x0207
 #define USB_PRODUCT_XBOX360_XUSB_CONTROLLER                 0x02a1    /* XUSB driver software PID */
 #define USB_PRODUCT_XBOX360_WIRED_CONTROLLER                0x028e
 #define USB_PRODUCT_XBOX360_WIRELESS_RECEIVER               0x0719