From 2ea393bd83caa3d268efdeecc483f9f3f40b42fc Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 15 Jan 2021 14:36:21 -0800 Subject: [PATCH] Fixed the screenshot button mapping on third party Bluetooth Nintendo Switch Pro controllers --- src/joystick/SDL_gamecontroller.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index 9f797169a..377803e39 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -605,6 +605,10 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string)); break; default: + if (vendor == 0 && product == 0) { + /* This is a Bluetooth Nintendo Switch Pro controller */ + SDL_strlcat(mapping_string, "misc1:b15,", sizeof(mapping_string)); + } break; } }