diff options
author | Paul Gilbert | 2017-08-06 11:23:12 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-08-06 11:23:12 -0400 |
commit | 17089becd410e4e1b95e64c9d0207ffc3eac5801 (patch) | |
tree | 3b5f818700ea9f0f736c75a21578eee9c7a063bd /engines/titanic/input_translator.cpp | |
parent | 665f5c99b2ca3db67f75ecfa683389e213d942a6 (diff) | |
download | scummvm-rg350-17089becd410e4e1b95e64c9d0207ffc3eac5801.tar.gz scummvm-rg350-17089becd410e4e1b95e64c9d0207ffc3eac5801.tar.bz2 scummvm-rg350-17089becd410e4e1b95e64c9d0207ffc3eac5801.zip |
TITANIC: Fix handling of NumPad causing double digits
Diffstat (limited to 'engines/titanic/input_translator.cpp')
-rw-r--r-- | engines/titanic/input_translator.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/titanic/input_translator.cpp b/engines/titanic/input_translator.cpp index bd805258d5..c5640a48bc 100644 --- a/engines/titanic/input_translator.cpp +++ b/engines/titanic/input_translator.cpp @@ -86,13 +86,15 @@ void CInputTranslator::mouseWheel(bool wheelUp, const Point &pt) { } void CInputTranslator::keyDown(const Common::KeyState &keyState) { - if (isSpecialKey(keyState.keycode)) { - CVirtualKeyCharMsg msg(keyState); - _inputHandler->handleMessage(msg); - } - if (keyState.ascii > 0 && keyState.ascii <= 127) { CKeyCharMsg msg(keyState.ascii); + if (_inputHandler->handleMessage(msg)) + return; + } + + if (isSpecialKey(keyState.keycode)) { + CVirtualKeyCharMsg msg(keyState); + msg._keyState.ascii = 0; _inputHandler->handleMessage(msg); } } |