From 81fdf2c10306fa8d449476f6c77afb8299b93f4d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 Sep 2011 00:56:10 +0300 Subject: AGI: Fixed bug #3074570 - "AGI LSL1: TAB stops working after restart" Applied eriktorbjorn's patch from that bug tracker item (slightly modified), which is what NAGI does, and which fixes restarting in LSL1 and PQ1 (bug #2823762), and other AGI games that do not reset the controller keys when restarting. --- engines/agi/keyboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/agi/keyboard.cpp') diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index d899a6e202..4ac08492ae 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -114,7 +114,7 @@ int AgiEngine::handleController(int key) { debugC(3, kDebugLevelInput, "key = %04x", key); - for (i = 0; i < _game.lastController; i++) { + for (i = 0; i < MAX_CONTROLLERS; i++) { if (_game.controllers[i].keycode == key) { debugC(3, kDebugLevelInput, "event %d: key press", _game.controllers[i].controller); _game.controllerOccured[_game.controllers[i].controller] = true; -- cgit v1.2.3