Added support for the Astro C40 in Xbox 360 mode

This commit is contained in:
Sam Lantinga
2023-04-27 17:10:44 -07:00
parent 60c5888423
commit a4b4dff4a2
6 changed files with 10 additions and 1 deletions

View File

@@ -63,6 +63,10 @@ static SDL_bool HIDAPI_DriverXbox360_IsSupportedDevice(SDL_HIDAPI_Device *device
{
const int XB360W_IFACE_PROTOCOL = 129; /* Wireless */
if (vendor_id == USB_VENDOR_ASTRO && product_id == USB_PRODUCT_ASTRO_C40_XBOX360) {
/* This is the ASTRO C40 in Xbox 360 mode */
return SDL_TRUE;
}
if (vendor_id == USB_VENDOR_NVIDIA) {
/* This is the NVIDIA Shield controller which doesn't talk Xbox controller protocol */
return SDL_FALSE;

View File

@@ -242,6 +242,7 @@ static SDL_GamepadType SDL_GetJoystickGameControllerProtocol(const char *name, U
0x24c6, /* PowerA */
0x2c22, /* Qanba */
0x2dc8, /* 8BitDo */
0x9886, /* ASTRO Gaming */
};
int i;