From 3377861ab1f327694c7d5afea1d6d968853c6db5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 26 Mar 2021 11:57:19 -0700 Subject: [PATCH] Added support for the Amazon Game Controller to the HIDAPI driver --- src/hidapi/libusb/hid.c | 1 + src/joystick/SDL_joystick.c | 1 + src/joystick/controller_type.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c index 68979c299..3fd95e061 100644 --- a/src/hidapi/libusb/hid.c +++ b/src/hidapi/libusb/hid.c @@ -506,6 +506,7 @@ static int is_xbox360(unsigned short vendor_id, const struct libusb_interface_de 0x15e4, /* Numark */ 0x162e, /* Joytech */ 0x1689, /* Razer Onza */ + 0x1949, /* Lab126, Inc. */ 0x1bad, /* Harmonix */ 0x20d6, /* PowerA */ 0x24c6, /* PowerA */ diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 60c9c047a..7d7a12a31 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -1815,6 +1815,7 @@ SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 produc 0x15e4, /* Numark */ 0x162e, /* Joytech */ 0x1689, /* Razer Onza */ + 0x1949, /* Lab126, Inc. */ 0x1bad, /* Harmonix */ 0x20d6, /* PowerA */ 0x24c6, /* PowerA */ diff --git a/src/joystick/controller_type.h b/src/joystick/controller_type.h index 6a13ed7fb..663cb0cc3 100644 --- a/src/joystick/controller_type.h +++ b/src/joystick/controller_type.h @@ -255,6 +255,7 @@ static const ControllerDescription_t arrControllers[] = { { MAKE_CONTROLLER_ID( 0x1689, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Tournament Edition { MAKE_CONTROLLER_ID( 0x1689, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Classic Edition { MAKE_CONTROLLER_ID( 0x1689, 0xfe00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth + { MAKE_CONTROLLER_ID( 0x1949, 0x041a ), k_eControllerType_XBox360Controller, NULL }, // Amazon Game Controller { MAKE_CONTROLLER_ID( 0x1bad, 0x0002 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Guitar { MAKE_CONTROLLER_ID( 0x1bad, 0x0003 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Drumkit { MAKE_CONTROLLER_ID( 0x1bad, 0xf016 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller