Added support for the PowerA Xbox One Series X Wired Controller
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c
index f3fdfb3..68979c2 100644
--- a/src/hidapi/libusb/hid.c
+++ b/src/hidapi/libusb/hid.c
@@ -507,6 +507,7 @@ static int is_xbox360(unsigned short vendor_id, const struct libusb_interface_de
0x162e, /* Joytech */
0x1689, /* Razer Onza */
0x1bad, /* Harmonix */
+ 0x20d6, /* PowerA */
0x24c6, /* PowerA */
};
@@ -534,6 +535,7 @@ static int is_xboxone(unsigned short vendor_id, const struct libusb_interface_de
0x0e6f, /* PDP */
0x0f0d, /* Hori */
0x1532, /* Razer Wildcat */
+ 0x20d6, /* PowerA */
0x24c6, /* PowerA */
0x2e24, /* Hyperkin */
};
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index d532e52..5a84b95 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -1813,6 +1813,7 @@ SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 produc
0x162e, /* Joytech */
0x1689, /* Razer Onza */
0x1bad, /* Harmonix */
+ 0x20d6, /* PowerA */
0x24c6, /* PowerA */
};
@@ -1836,6 +1837,7 @@ SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 produc
0x0e6f, /* PDP */
0x0f0d, /* Hori */
0x1532, /* Razer Wildcat */
+ 0x20d6, /* PowerA */
0x24c6, /* PowerA */
0x2e24, /* Hyperkin */
};
@@ -1923,6 +1925,11 @@ SDL_IsJoystickXboxOneSeriesX(Uint16 vendor_id, Uint16 product_id)
return SDL_TRUE;
}
}
+ if (vendor_id == USB_VENDOR_POWERA_ALT) {
+ if (product_id == USB_PRODUCT_XBOX_ONE_SERIES_X_POWERA) {
+ return SDL_TRUE;
+ }
+ }
return SDL_FALSE;
}
diff --git a/src/joystick/controller_type.h b/src/joystick/controller_type.h
index 7fbed25..6a13ed7 100644
--- a/src/joystick/controller_type.h
+++ b/src/joystick/controller_type.h
@@ -398,9 +398,10 @@ static const ControllerDescription_t arrControllers[] = {
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a00 ), k_eControllerType_XBoxOneController, NULL }, // Razer Atrox Arcade Stick
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a03 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wildcat
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a14 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wolverine Ultimate
+ { MAKE_CONTROLLER_ID( 0x20d6, 0x2001 ), k_eControllerType_XBoxOneController, "PowerA Xbox One Series X Controller" }, // PowerA Xbox One Series X Wired Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x541a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Xbox One Mini Wired Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x542a ), k_eControllerType_XBoxOneController, NULL }, // Xbox ONE spectra
- { MAKE_CONTROLLER_ID( 0x24c6, 0x543a ), k_eControllerType_XBoxOneController, "PowerA XBox One Controller" }, // PowerA Xbox ONE liquid metal controller
+ { MAKE_CONTROLLER_ID( 0x24c6, 0x543a ), k_eControllerType_XBoxOneController, "PowerA Xbox One Controller" }, // PowerA Xbox ONE liquid metal controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x551a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Pro Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x561a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x581a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Classic Controller
diff --git a/src/joystick/usb_ids.h b/src/joystick/usb_ids.h
index e877988..db81d12 100644
--- a/src/joystick/usb_ids.h
+++ b/src/joystick/usb_ids.h
@@ -31,6 +31,7 @@
#define USB_VENDOR_NINTENDO 0x057e
#define USB_VENDOR_NVIDIA 0x0955
#define USB_VENDOR_PDP 0x0e6f
+#define USB_VENDOR_POWERA_ALT 0x20d6
#define USB_VENDOR_POWERA 0x24c6
#define USB_VENDOR_RAZER 0x1532
#define USB_VENDOR_SHENZHEN 0x0079
@@ -58,6 +59,7 @@
#define USB_PRODUCT_XBOX_ONE_S_REV2_BLUETOOTH 0x02fd
#define USB_PRODUCT_XBOX_ONE_SERIES_X 0x0b12
#define USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH 0x0b13
+#define USB_PRODUCT_XBOX_ONE_SERIES_X_POWERA 0x2001
#define USB_PRODUCT_XBOX_ONE_RAW_INPUT_CONTROLLER 0x02ff
#define USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER 0x02fe /* Made up product ID for XInput */