mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user