Added HIDAPI support for the Amazon Luna Controller connected over USB in DirectInput mode

This commit is contained in:
Sam Lantinga
2021-07-07 09:49:33 -07:00
parent 863f566941
commit 430bbcb87f
3 changed files with 121 additions and 13 deletions

View File

@@ -593,7 +593,8 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI
if (SDL_IsJoystickXboxSeriesX(vendor, product)) {
/* XBox Series X Controllers have a share button under the guide button */
SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string));
} else if (vendor == BLUETOOTH_VENDOR_AMAZON && product == BLUETOOTH_PRODUCT_LUNA_CONTROLLER) {
} else if ((vendor == USB_VENDOR_AMAZON && product == USB_PRODUCT_AMAZON_LUNA_CONTROLLER) ||
(vendor == BLUETOOTH_VENDOR_AMAZON && product == BLUETOOTH_PRODUCT_LUNA_CONTROLLER)) {
/* Amazon Luna Controller has a mic button under the guide button */
SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string));
} else if (SDL_IsJoystickXboxOneElite(vendor, product)) {