mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
Actually we need to enumerate the 8BitDo Xbox SKUs
At the point we're calling SDL_IsJoystickXboxSeriesX(), we don't know for sure that the controller is an Xbox controller. Fixes https://github.com/libsdl-org/SDL/issues/8174
This commit is contained in:
@@ -2503,14 +2503,11 @@ SDL_bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (vendor_id == USB_VENDOR_8BITDO) {
|
if (vendor_id == USB_VENDOR_8BITDO) {
|
||||||
/* 8BitDo started making Xbox form factor controllers after the Series X
|
if (product_id == USB_PRODUCT_8BITDO_XBOX_CONTROLLER1 ||
|
||||||
* release, so we'll assume for now that they all have the share button.
|
product_id == USB_PRODUCT_8BITDO_XBOX_CONTROLLER2) {
|
||||||
*
|
|
||||||
* We know for sure that the Ultimate Wired Controller for Xbox (0x2002)
|
|
||||||
* and the Ultimate Wireless / Pro 2 Wired Controller (0x3106) have them.
|
|
||||||
*/
|
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (vendor_id == USB_VENDOR_GAMESIR) {
|
if (vendor_id == USB_VENDOR_GAMESIR) {
|
||||||
if (product_id == USB_PRODUCT_GAMESIR_G7) {
|
if (product_id == USB_PRODUCT_GAMESIR_G7) {
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
|
@@ -55,6 +55,8 @@
|
|||||||
#define USB_VENDOR_VALVE 0x28de
|
#define USB_VENDOR_VALVE 0x28de
|
||||||
#define USB_VENDOR_ZEROPLUS 0x0c12
|
#define USB_VENDOR_ZEROPLUS 0x0c12
|
||||||
|
|
||||||
|
#define USB_PRODUCT_8BITDO_XBOX_CONTROLLER1 0x2002 /* Ultimate Wired Controller for Xbox */
|
||||||
|
#define USB_PRODUCT_8BITDO_XBOX_CONTROLLER2 0x3106 /* Ultimate Wireless / Pro 2 Wired Controller */
|
||||||
#define USB_PRODUCT_AMAZON_LUNA_CONTROLLER 0x0419
|
#define USB_PRODUCT_AMAZON_LUNA_CONTROLLER 0x0419
|
||||||
#define USB_PRODUCT_ASTRO_C40_XBOX360 0x0024
|
#define USB_PRODUCT_ASTRO_C40_XBOX360 0x0024
|
||||||
#define USB_PRODUCT_BACKBONE_ONE_IOS 0x0103
|
#define USB_PRODUCT_BACKBONE_ONE_IOS 0x0103
|
||||||
|
Reference in New Issue
Block a user