add 8BitDo Controller (#12964)

add SN30 Pro, SF30 Pro, Pro 2.
Supported versions:
Pro 2 v3.06  above
SF30 Pro/SN30 Pro v2.05 above
This commit is contained in:
8BitDo
2025-05-07 10:47:10 +08:00
committed by GitHub
parent ca47dc59a9
commit 2b3c481215
3 changed files with 46 additions and 2 deletions

View File

@@ -3177,7 +3177,20 @@ bool SDL_IsJoystickHoriSteamController(Uint16 vendor_id, Uint16 product_id)
bool SDL_IsJoystick8BitDoController(Uint16 vendor_id, Uint16 product_id)
{
return vendor_id == USB_VENDOR_8BITDO && (product_id == USB_PRODUCT_8BITDO_ULTIMATE2_WIRELESS);
if (vendor_id == USB_VENDOR_8BITDO) {
switch (product_id) {
case USB_PRODUCT_8BITDO_ULTIMATE2_WIRELESS:
case USB_PRODUCT_8BITDO_SN30_PRO:
case USB_PRODUCT_8BITDO_SN30_PRO_BT:
case USB_PRODUCT_8BITDO_SF30_PRO:
case USB_PRODUCT_8BITDO_PRO_2:
case USB_PRODUCT_8BITDO_PRO_2_BT:
return true;
default:
break;
}
}
return false;
}
bool SDL_IsJoystickSteamDeck(Uint16 vendor_id, Uint16 product_id)