mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-13 15:13:54 +00:00
Fix JoyCon pair type detection on the web
(cherry picked from commit 5e54decf53)
This commit is contained in:
@@ -3039,6 +3039,8 @@ SDL_GamepadType SDL_GetGamepadTypeFromVIDPID(Uint16 vendor, Uint16 product, cons
|
||||
} else if (vendor == USB_VENDOR_NINTENDO && product == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_GRIP) {
|
||||
if (name && SDL_strstr(name, "(L)") != NULL) {
|
||||
type = SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT;
|
||||
} else if (name && SDL_strstr(name, "L+R") != NULL) {
|
||||
type = SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR;
|
||||
} else {
|
||||
type = SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user