From 4175ca6052da9ddd8ce807210a1d6e267111ce98 Mon Sep 17 00:00:00 2001 From: Matthew Budd Date: Fri, 24 Jul 2020 22:26:09 -0400 Subject: [PATCH] Added logic to skip unassigned buttons in the config. --- src/drivers/Qt/sdl-joystick.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/Qt/sdl-joystick.cpp b/src/drivers/Qt/sdl-joystick.cpp index 44645a93..89a3cbac 100644 --- a/src/drivers/Qt/sdl-joystick.cpp +++ b/src/drivers/Qt/sdl-joystick.cpp @@ -404,6 +404,10 @@ int GamePad_t::setMapping( nesGamePadMap_t *gpm ) bmap[i].DeviceNum = -1; bmap[i].ButtonNum = -1; + if (gpm->btn[i][0] == 0) + { + continue; + } if (gpm->btn[i][0] == 'k') { SDL_Keycode key;