Răsfoiți Sursa

Fixed initializing the PowerA Fusion Pro 4 on Steam Link hardware

Sam Lantinga 3 săptămâni în urmă
părinte
comite
2b484a1ccb
1 a modificat fișierele cu 8 adăugiri și 2 ștergeri
  1. 8 2
      src/joystick/hidapi/SDL_hidapi_xboxone.c

+ 8 - 2
src/joystick/hidapi/SDL_hidapi_xboxone.c

@@ -273,8 +273,14 @@ static bool SendSerialRequest(SDL_DriverXboxOne_Context *ctx)
 
 
 static bool ControllerSendsAnnouncement(Uint16 vendor_id, Uint16 product_id)
 static bool ControllerSendsAnnouncement(Uint16 vendor_id, Uint16 product_id)
 {
 {
-    if (vendor_id == USB_VENDOR_PDP && product_id == 0x0246) {
-        // The PDP Rock Candy (PID 0x0246) doesn't send the announce packet on Linux for some reason
+    // The PDP Rock Candy (PID 0x0246) and PowerA Fusion Pro 4 (PID 0x400b)
+    // don't send the announce packet on Linux for some reason.
+    //
+    // Just to be safe and cover future products, we'll always send the startup
+    // protocol sequence for PDP and PowerA controllers
+    if (vendor_id == USB_VENDOR_PDP ||
+        vendor_id == USB_VENDOR_POWERA ||
+        vendor_id == USB_VENDOR_POWERA_ALT) {
         return false;
         return false;
     }
     }
     return true;
     return true;