Added support for the PowerA Xbox One Series X Wired Controller

This commit is contained in:
Sam Lantinga 2021-02-11 17:27:22 -08:00
parent f9046b4cab
commit 1f7ec3fa4e
4 changed files with 13 additions and 1 deletions

View File

@ -507,6 +507,7 @@ static int is_xbox360(unsigned short vendor_id, const struct libusb_interface_de
0x162e, /* Joytech */ 0x162e, /* Joytech */
0x1689, /* Razer Onza */ 0x1689, /* Razer Onza */
0x1bad, /* Harmonix */ 0x1bad, /* Harmonix */
0x20d6, /* PowerA */
0x24c6, /* PowerA */ 0x24c6, /* PowerA */
}; };
@ -534,6 +535,7 @@ static int is_xboxone(unsigned short vendor_id, const struct libusb_interface_de
0x0e6f, /* PDP */ 0x0e6f, /* PDP */
0x0f0d, /* Hori */ 0x0f0d, /* Hori */
0x1532, /* Razer Wildcat */ 0x1532, /* Razer Wildcat */
0x20d6, /* PowerA */
0x24c6, /* PowerA */ 0x24c6, /* PowerA */
0x2e24, /* Hyperkin */ 0x2e24, /* Hyperkin */
}; };

View File

@ -1813,6 +1813,7 @@ SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 produc
0x162e, /* Joytech */ 0x162e, /* Joytech */
0x1689, /* Razer Onza */ 0x1689, /* Razer Onza */
0x1bad, /* Harmonix */ 0x1bad, /* Harmonix */
0x20d6, /* PowerA */
0x24c6, /* PowerA */ 0x24c6, /* PowerA */
}; };
@ -1836,6 +1837,7 @@ SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 produc
0x0e6f, /* PDP */ 0x0e6f, /* PDP */
0x0f0d, /* Hori */ 0x0f0d, /* Hori */
0x1532, /* Razer Wildcat */ 0x1532, /* Razer Wildcat */
0x20d6, /* PowerA */
0x24c6, /* PowerA */ 0x24c6, /* PowerA */
0x2e24, /* Hyperkin */ 0x2e24, /* Hyperkin */
}; };
@ -1923,6 +1925,11 @@ SDL_IsJoystickXboxOneSeriesX(Uint16 vendor_id, Uint16 product_id)
return SDL_TRUE; 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; return SDL_FALSE;
} }

View File

@ -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, 0x0a00 ), k_eControllerType_XBoxOneController, NULL }, // Razer Atrox Arcade Stick
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a03 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wildcat { 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( 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, 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, 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, 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, 0x561a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x581a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Classic Controller { MAKE_CONTROLLER_ID( 0x24c6, 0x581a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Classic Controller

View File

@ -31,6 +31,7 @@
#define USB_VENDOR_NINTENDO 0x057e #define USB_VENDOR_NINTENDO 0x057e
#define USB_VENDOR_NVIDIA 0x0955 #define USB_VENDOR_NVIDIA 0x0955
#define USB_VENDOR_PDP 0x0e6f #define USB_VENDOR_PDP 0x0e6f
#define USB_VENDOR_POWERA_ALT 0x20d6
#define USB_VENDOR_POWERA 0x24c6 #define USB_VENDOR_POWERA 0x24c6
#define USB_VENDOR_RAZER 0x1532 #define USB_VENDOR_RAZER 0x1532
#define USB_VENDOR_SHENZHEN 0x0079 #define USB_VENDOR_SHENZHEN 0x0079
@ -58,6 +59,7 @@
#define USB_PRODUCT_XBOX_ONE_S_REV2_BLUETOOTH 0x02fd #define USB_PRODUCT_XBOX_ONE_S_REV2_BLUETOOTH 0x02fd
#define USB_PRODUCT_XBOX_ONE_SERIES_X 0x0b12 #define USB_PRODUCT_XBOX_ONE_SERIES_X 0x0b12
#define USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH 0x0b13 #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_RAW_INPUT_CONTROLLER 0x02ff
#define USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER 0x02fe /* Made up product ID for XInput */ #define USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER 0x02fe /* Made up product ID for XInput */