Explorar o código

Updated SDL_IsJoystickSInputController() to match style in file

Sam Lantinga hai 1 mes
pai
achega
fc19ae343c
Modificáronse 1 ficheiros con 9 adicións e 7 borrados
  1. 9 7
      src/joystick/SDL_joystick.c

+ 9 - 7
src/joystick/SDL_joystick.c

@@ -3204,13 +3204,15 @@ bool SDL_IsJoystickHoriSteamController(Uint16 vendor_id, Uint16 product_id)
 
 bool SDL_IsJoystickSInputController(Uint16 vendor_id, Uint16 product_id)
 {
-    bool vendor_match = (vendor_id == USB_VENDOR_RASPBERRYPI);
-    bool product_match =
-        (product_id == USB_PRODUCT_HANDHELDLEGEND_SINPUT_GENERIC) |
-        (product_id == USB_PRODUCT_HANDHELDLEGEND_PROGCC) |
-        (product_id == USB_PRODUCT_HANDHELDLEGEND_GCULTIMATE) |
-        (product_id == USB_PRODUCT_BONJIRICHANNEL_FIREBIRD);
-    return (vendor_match && product_match);
+    if (vendor_id == USB_VENDOR_RASPBERRYPI) {
+        if (product_id == USB_PRODUCT_HANDHELDLEGEND_SINPUT_GENERIC ||
+            product_id == USB_PRODUCT_HANDHELDLEGEND_PROGCC ||
+            product_id == USB_PRODUCT_HANDHELDLEGEND_GCULTIMATE ||
+            product_id == USB_PRODUCT_BONJIRICHANNEL_FIREBIRD) {
+            return true;
+        }
+    }
+    return false;
 }
 
 bool SDL_IsJoystickFlydigiController(Uint16 vendor_id, Uint16 product_id)