From ca790028cb845f56e021fad84bc58d9e251785a4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Feb 2016 19:30:42 +0300 Subject: Replace unknown scan codes in SDL2 to unknown constant. --- src/input/inputmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2