aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2007-05-26 18:12:12 +0000
committerEugene Sandulenko2007-05-26 18:12:12 +0000
commitac45c5b33d834acbc9718f89be76e49d403a4d2c (patch)
tree69ab0b9298fff84f3411900fb72d054b41688196 /engines/scumm
parentf1e29981edb66f5427d0bbada073875788ba992f (diff)
downloadscummvm-rg350-ac45c5b33d834acbc9718f89be76e49d403a4d2c.tar.gz
scummvm-rg350-ac45c5b33d834acbc9718f89be76e49d403a4d2c.tar.bz2
scummvm-rg350-ac45c5b33d834acbc9718f89be76e49d403a4d2c.zip
Fix bug #1709430: "FT: CAPSLOCK + V enables cheating for all fights"
svn-id: r26948
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/input.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 54feafb115..d31d3afd85 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -145,8 +145,18 @@ void ScummEngine::parseEvents() {
// possible to a bug in sdl-common.cpp
if (event.kbd.ascii >= 512)
debugC(DEBUG_GENERAL, "keyPressed > 512 (%d)", event.kbd.ascii);
- else
+ else {
_keyDownMap[event.kbd.ascii] = false;
+
+ // Due to some weird bug with capslock key pressed
+ // generated keydown event is for lower letter but
+ // keyup is for upper letter
+ // On most (all?) keyboards it is safe to assume that
+ // both upper and lower letters are unpressed on keyup event
+ //
+ // Fixes bug #1709430: "FT: CAPSLOCK + V enables cheating for all fights"
+ _keyDownMap[toupper(event.kbd.ascii)] = false;
+ }
break;