aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/menu.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2007-07-11 11:46:02 +0000
committerFilippos Karapetis2007-07-11 11:46:02 +0000
commit1dfc0614b7015f14d42cabd3fc5c2c542282966c (patch)
tree21cd0a1767763fbf528ee922a77b475996430fbb /engines/agi/menu.cpp
parent3f2c527b0eb2ba4baa1e2af0d020f396c348be4d (diff)
downloadscummvm-rg350-1dfc0614b7015f14d42cabd3fc5c2c542282966c.tar.gz
scummvm-rg350-1dfc0614b7015f14d42cabd3fc5c2c542282966c.tar.bz2
scummvm-rg350-1dfc0614b7015f14d42cabd3fc5c2c542282966c.zip
Fix for bug #1751390 in LSL1. When choosing a menu option, an appropriate event is set. If that event is equal to 0x20, it was incorrectly triggered when the space bar key was pressed
svn-id: r28024
Diffstat (limited to 'engines/agi/menu.cpp')
-rw-r--r--engines/agi/menu.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index 52e402bf12..4cba788273 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -351,6 +351,12 @@ bool Menu::keyhandler(int key) {
debugC(6, kDebugLevelMenu | kDebugLevelInput, "event %d registered", d->event);
_vm->_game.evKeyp[d->event].occured = true;
_vm->_game.evKeyp[d->event].data = d->event;
+ // In LSL1, event 0x20 is set when changing the game speed to normal via the menu
+ // Do not set the event data to 0x20, as this event is then incorrectly triggered
+ // when the spacebar is pressed, which has a keycode equal to 0x20 as well
+ // Fixes bug #1751390 - "LSL: after changing game speed, space key turn unfunctional"
+ if (d->event == 0x20)
+ _vm->_game.evKeyp[d->event].data = d->event + 1;
goto exit_menu;
}
}