diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-09 22:54:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-09 22:56:17 +0300 |
commit | 481ea0b776bbab92b500540f59c5a191c6e93cba (patch) | |
tree | 5b73e15b5ab16d67095852d83ba764d83c36cbb8 /src/input/joystick.cpp | |
parent | c108b00ddc98e99182bf1a0f83602772f4931122 (diff) | |
download | plus-481ea0b776bbab92b500540f59c5a191c6e93cba.tar.gz plus-481ea0b776bbab92b500540f59c5a191c6e93cba.tar.bz2 plus-481ea0b776bbab92b500540f59c5a191c6e93cba.tar.xz plus-481ea0b776bbab92b500540f59c5a191c6e93cba.zip |
Add workaround for fix alt-tab issue in SDL2.
Also add option to enable/disable this workaround.
Diffstat (limited to 'src/input/joystick.cpp')
-rw-r--r-- | src/input/joystick.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp index 1e53af5b1..10ed33924 100644 --- a/src/input/joystick.cpp +++ b/src/input/joystick.cpp @@ -180,7 +180,8 @@ void Joystick::logic() mDirection = 0; - if (mUseInactive || settings.inputFocused) + if (mUseInactive || + settings.inputFocused != KeyboardFocus::Unfocused) { // X-Axis int position = SDL_JoystickGetAxis(mJoystick, 0); @@ -350,7 +351,8 @@ bool Joystick::validate() const if (mCalibrating || !mEnabled || !mCalibrated) return false; - return mUseInactive || settings.inputFocused; + return mUseInactive || + settings.inputFocused != KeyboardFocus::Unfocused; } void Joystick::handleRepeat(const int time) |