mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-27 09:01:34 +00:00
Added support for the ThrustMaster eSwap PRO Controller Xbox
This commit is contained in:
@@ -684,6 +684,7 @@ static void HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_D
|
||||
* Xbox Series X firmware version 5.1, report is 44 bytes, share button is in byte 18
|
||||
* Xbox Series X firmware version 5.5, report is 48 bytes, share button is in byte 22
|
||||
* Victrix Gambit Tournament Controller, report is 50 bytes, share button is in byte 32
|
||||
* ThrustMaster eSwap PRO Controller Xbox, report is 64 bytes, share button is in byte 46
|
||||
*/
|
||||
if (size < 48) {
|
||||
if (ctx->last_state[18] != data[18]) {
|
||||
@@ -697,6 +698,10 @@ static void HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_D
|
||||
if (ctx->last_state[32] != data[32]) {
|
||||
SDL_SendJoystickButton(timestamp, joystick, SDL_GAMEPAD_BUTTON_MISC1, (data[32] & 0x01) ? SDL_PRESSED : SDL_RELEASED);
|
||||
}
|
||||
} else if (size == 64) {
|
||||
if (ctx->last_state[46] != data[46]) {
|
||||
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data[46] & 0x01) ? SDL_PRESSED : SDL_RELEASED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ static SDL_GamepadType SDL_GetJoystickGameControllerProtocol(const char *name, U
|
||||
interface_protocol == XBONE_IFACE_PROTOCOL) {
|
||||
|
||||
static const int SUPPORTED_VENDORS[] = {
|
||||
0x044f, /* Thrustmaster */
|
||||
0x045e, /* Microsoft */
|
||||
0x0738, /* Mad Catz */
|
||||
0x0e6f, /* PDP */
|
||||
|
||||
Reference in New Issue
Block a user