From fc19ae343cc1fd912aec157451e58d4340f58f13 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 21 Jul 2025 11:38:54 -0700
Subject: [PATCH] Updated SDL_IsJoystickSInputController() to match style in
file
---
src/joystick/SDL_joystick.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 0a1b13c338dc7..70c952b78a7c7 100644
--- a/src/joystick/SDL_joystick.c
+++ b/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)