summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-18 19:30:42 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-18 19:30:42 +0300
commitca790028cb845f56e021fad84bc58d9e251785a4 (patch)
treebd21dd70a71350eace1d43ce2b3615e62b9f6dd3 /src/input/inputmanager.cpp
parentfe504040c415c8d2692dcbd1c6374ae52ee52777 (diff)
downloadmanaplus-ca790028cb845f56e021fad84bc58d9e251785a4.tar.gz
manaplus-ca790028cb845f56e021fad84bc58d9e251785a4.tar.bz2
manaplus-ca790028cb845f56e021fad84bc58d9e251785a4.tar.xz
manaplus-ca790028cb845f56e021fad84bc58d9e251785a4.zip
Replace unknown scan codes in SDL2 to unknown constant.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r--src/input/inputmanager.cpp4
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;