aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray2003-08-21 15:33:25 +0000
committerJonathan Gray2003-08-21 15:33:25 +0000
commit446ca58580a6cbcad986ea9d13b64322a06f8fce (patch)
treef2879c2088c8e54a34ba21b99b6c76d1e92853a1
parenta51be5d39e0d69b835f476874c63433b85274baa (diff)
downloadscummvm-rg350-446ca58580a6cbcad986ea9d13b64322a06f8fce.tar.gz
scummvm-rg350-446ca58580a6cbcad986ea9d13b64322a06f8fce.tar.bz2
scummvm-rg350-446ca58580a6cbcad986ea9d13b64322a06f8fce.zip
crude fix for bug #786995 stop arrow keys being sent to scripts as they are currently stolen by the keyboard cursor control stuff. I will soon either gut the keyboard cursor stuff or make it non default as it breaks several things
svn-id: r9809
-rw-r--r--scumm/scummvm.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 2b43cf0ed0..91bcb0724c 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1442,7 +1442,11 @@ void Scumm::parseEvents() {
// this remaps F1 to F5 for comi
} else if (event.kbd.ascii == 315 && _gameId == GID_CMI)
_keyPressed = 319;
- else
+ // don't let game have arrow keys as we currently steal them
+ // for keyboard cursor control
+ // this fixes bug with up arrow (273) corresponding to
+ // "instant win" cheat in MI2 mentioned above
+ else if (event.kbd.ascii < 273 || event.kbd.ascii > 276)
_keyPressed = event.kbd.ascii; // Normal key press, pass on to the game.
break;