joystick: Add HIDAPI driver for NVIDIA SHIELD 2017 controller

Basic input already works using the OS HID driver, but this enables
force feedback and battery state reporting.
This commit is contained in:
Cameron Gutman 2022-07-09 22:55:36 -05:00 committed by Sam Lantinga
parent 3242265ff1
commit 6e712d2440
15 changed files with 499 additions and 3 deletions

View file

@ -634,6 +634,10 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI
/* The Google Stadia controller has a share button and a Google Assistant button */
SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string));
break;
case SDL_CONTROLLER_TYPE_NVIDIA_SHIELD:
/* The NVIDIA SHIELD controller has a home button between back and start buttons */
SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string));
break;
default:
if (vendor == 0 && product == 0) {
/* This is a Bluetooth Nintendo Switch Pro controller */