mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-15 10:47:52 +00:00
Fix JoyCon pair type detection on the web
(cherry picked from commit 5e54decf53)
This commit is contained in:
parent
d4d6f50736
commit
fdab62170e
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue