diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-18 19:30:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-18 19:30:42 +0300 |
commit | ca790028cb845f56e021fad84bc58d9e251785a4 (patch) | |
tree | bd21dd70a71350eace1d43ce2b3615e62b9f6dd3 /src/input | |
parent | fe504040c415c8d2692dcbd1c6374ae52ee52777 (diff) | |
download | plus-ca790028cb845f56e021fad84bc58d9e251785a4.tar.gz plus-ca790028cb845f56e021fad84bc58d9e251785a4.tar.bz2 plus-ca790028cb845f56e021fad84bc58d9e251785a4.tar.xz plus-ca790028cb845f56e021fad84bc58d9e251785a4.zip |
Replace unknown scan codes in SDL2 to unknown constant.
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/inputmanager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index 1f9869d4d..837e1d811 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -256,6 +256,10 @@ void InputManager::resetKey(const InputActionT i) restrict2 val1.value = SDL_GetScancodeFromKey(kd.defaultValue2); else val1.value = kd.defaultValue2; + if (val0.value == SDL_SCANCODE_UNKNOWN) + val0.value = -1; + if (val1.value == SDL_SCANCODE_UNKNOWN) + val1.value = -1; #else val0.value = kd.defaultValue1; val1.value = kd.defaultValue2; |