diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/qt_sdl/Input.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/frontend/qt_sdl/Input.cpp b/src/frontend/qt_sdl/Input.cpp index 27c42e9..7ebd7e2 100644 --- a/src/frontend/qt_sdl/Input.cpp +++ b/src/frontend/qt_sdl/Input.cpp @@ -209,16 +209,22 @@ void Process() } JoyInputMask = 0xFFF; - for (int i = 0; i < 12; i++) - if (JoystickButtonDown(Config::JoyMapping[i])) - JoyInputMask &= ~(1<<i); + if (Joystick) + { + for (int i = 0; i < 12; i++) + if (JoystickButtonDown(Config::JoyMapping[i])) + JoyInputMask &= ~(1 << i); + } InputMask = KeyInputMask & JoyInputMask; JoyHotkeyMask = 0; - for (int i = 0; i < HK_MAX; i++) - if (JoystickButtonDown(Config::HKJoyMapping[i])) - JoyHotkeyMask |= (1<<i); + if (Joystick) + { + for (int i = 0; i < HK_MAX; i++) + if (JoystickButtonDown(Config::HKJoyMapping[i])) + JoyHotkeyMask |= (1 << i); + } HotkeyMask = KeyHotkeyMask | JoyHotkeyMask; HotkeyPress = HotkeyMask & ~LastHotkeyMask; |