[Scummvm-git-logs] scummvm master -> 5d5cc0561019fe3ae813e1810a8cda9c877e7104
AndywinXp
noreply at scummvm.org
Mon Nov 13 18:53:40 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5d5cc05610 SCUMM: Improve numpad remapping following PR #5406
Commit: 5d5cc0561019fe3ae813e1810a8cda9c877e7104
https://github.com/scummvm/scummvm/commit/5d5cc0561019fe3ae813e1810a8cda9c877e7104
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-13T19:53:32+01:00
Commit Message:
SCUMM: Improve numpad remapping following PR #5406
In particular we set the _keyPressed object only when we find
an event.kbd for the numpad keys. Otherwise we immediately
get double events when pressing any key.
Changed paths:
engines/scumm/input.cpp
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 3a07854ef12..3d51876ba12 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -187,8 +187,8 @@ void ScummEngine::parseEvent(Common::Event event) {
// Normally, keypad keys would only have an ASCII value when
// NumLock is enabled. This fixes fighting in Indy 3 (Trac #11227)
- _keyPressed = event.kbd;
- if (_keyPressed.keycode >= Common::KEYCODE_KP0 && _keyPressed.keycode <= Common::KEYCODE_KP9) {
+ if (event.kbd.keycode >= Common::KEYCODE_KP0 && event.kbd.keycode <= Common::KEYCODE_KP9) {
+ _keyPressed = event.kbd;
_keyPressed.ascii = (_keyPressed.keycode - Common::KEYCODE_KP0) + '0';
}
More information about the Scummvm-git-logs
mailing list