Fixed bug 5466 - Add haptic support for Stadia Controller

Dimitriy Ryazantcev

Consider adding support for Stadia Controller haptics.

Here is example code how to deal with it:
99314be815/device/gamepad/hid_haptic_gamepad.cc (L45)
This commit is contained in:
Sam Lantinga
2021-01-23 11:06:35 -08:00
parent 96cfb81232
commit 1981d23f4b
6 changed files with 365 additions and 5 deletions

View File

@@ -612,6 +612,9 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI
if (vendor == 0 && product == 0) {
/* This is a Bluetooth Nintendo Switch Pro controller */
SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string));
} else if (vendor == USB_VENDOR_GOOGLE && product == USB_PRODUCT_GOOGLE_STADIA_CONTROLLER) {
/* The Google Stadia controller has a share button and a Google Assistant button */
SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string));
}
break;
}