Added support for the Xbox Series X controller to the HIDAPI driver

This commit is contained in:
Sam Lantinga
2020-11-10 12:26:30 -08:00
parent 7b5a0a9f97
commit e12457d8bf
7 changed files with 49 additions and 8 deletions

View File

@@ -1793,6 +1793,18 @@ SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id)
return SDL_FALSE;
}
SDL_bool
SDL_IsJoystickXboxOneSeriesX(Uint16 vendor_id, Uint16 product_id)
{
if (vendor_id == USB_VENDOR_MICROSOFT) {
if (product_id == USB_PRODUCT_XBOX_ONE_SERIES_X ||
product_id == USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH) {
return SDL_TRUE;
}
}
return SDL_FALSE;
}
SDL_bool
SDL_IsJoystickPS4(Uint16 vendor_id, Uint16 product_id)
{