add vids and pids for a variety of xbox 360 devices (#15211)

Added vids for a variety of xbox 360 devices, mostly for linux use.
Corrected wheel vid and pid being flagged as unknown. Internally, when XUSB is building vid and pids for wireless devices, it assigns 0x02a1 for devices with subtype 1 and 0x02a2 for devices with subtype 2, which are wheels.

Some of these vids and pids do rely on the following patch being merged into the linux kernel, as I have overhauled how VID and PIDs are handled there for wireless devices.
https://patchwork.kernel.org/project/linux-input/patch/20260314075034.1488655-2-sanjay.govind9@gmail.com/

Also added some lists for guitar and drum devices, so we can set controller types correctly for those controllers.
This commit is contained in:
Sanjay Govind
2026-03-18 05:45:26 +13:00
committed by GitHub
parent 43e90c7b1c
commit fdc5efe1cb
4 changed files with 140 additions and 3 deletions

View File

@@ -1342,6 +1342,23 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
/**
* A variable containing a list of drum style controllers.
*
* The format of the string is a comma separated list of USB VID/PID pairs in
* hexadecimal form, e.g.
*
* `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
*
* The variable can also take the form of "@file", in which case the named
* file will be loaded and interpreted as the value of the variable.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.4.4.
*/
#define SDL_HINT_JOYSTICK_DRUM_DEVICES "SDL_JOYSTICK_DRUM_DEVICES"
/**
* A variable controlling whether enhanced reports should be used for
* controllers when using the HIDAPI driver.
@@ -1461,6 +1478,23 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
/**
* A variable containing a list of guitar style controllers.
*
* The format of the string is a comma separated list of USB VID/PID pairs in
* hexadecimal form, e.g.
*
* `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
*
* The variable can also take the form of "@file", in which case the named
* file will be loaded and interpreted as the value of the variable.
*
* This hint can be set anytime.
*
* \since This hint is available since SDL 3.4.4.
*/
#define SDL_HINT_JOYSTICK_GUITAR_DEVICES "SDL_JOYSTICK_GUITAR_DEVICES"
/**
* A variable controlling whether the HIDAPI joystick drivers should be used.
*