From d3b882b4f9f46cdc31b835b33a4a993a75faa5f3 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 4 Nov 2024 10:48:50 -0800
Subject: [PATCH] Added support for the PowerA Fusion Pro 4 and Fusion Pro
Wireless controllers
---
src/joystick/SDL_joystick.c | 3 +++
src/joystick/usb_ids.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 8e27bc4d15658..e7fcc3b7fbeaf 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -2935,6 +2935,9 @@ bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id)
if (vendor_id == USB_VENDOR_POWERA_ALT) {
if ((product_id >= 0x2001 && product_id <= 0x201a) ||
product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2 ||
+ product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO4 ||
+ product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO_WIRELESS_USB ||
+ product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO_WIRELESS_DONGLE ||
product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_MOGA_XP_ULTRA ||
product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA) {
return true;
diff --git a/src/joystick/usb_ids.h b/src/joystick/usb_ids.h
index 202e3edd6d39d..06efe0f6f3177 100644
--- a/src/joystick/usb_ids.h
+++ b/src/joystick/usb_ids.h
@@ -150,6 +150,9 @@
#define USB_PRODUCT_XBOX_SERIES_X_PDP_AFTERGLOW 0x02da
#define USB_PRODUCT_XBOX_SERIES_X_PDP_BLUE 0x02d9
#define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2 0x4001
+#define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO4 0x400b
+#define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO_WIRELESS_USB 0x4014
+#define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO_WIRELESS_DONGLE 0x4016
#define USB_PRODUCT_XBOX_SERIES_X_POWERA_MOGA_XP_ULTRA 0x890b
#define USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA 0x4002
#define USB_PRODUCT_XBOX_SERIES_X_VICTRIX_GAMBIT 0x02d6