aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorEugene Sandulenko2009-07-22 11:48:51 +0000
committerEugene Sandulenko2009-07-22 11:48:51 +0000
commit7c1df4cbff0fc63123f907741ca1c5fefc1af791 (patch)
tree8a1852f2be5d91fa28005c7c7d45be760a008772 /engines/agi
parentd4c13b40a535f1269b774fd7ac4309ce66d3a18d (diff)
downloadscummvm-rg350-7c1df4cbff0fc63123f907741ca1c5fefc1af791.tar.gz
scummvm-rg350-7c1df4cbff0fc63123f907741ca1c5fefc1af791.tar.bz2
scummvm-rg350-7c1df4cbff0fc63123f907741ca1c5fefc1af791.zip
Fix bug #2823762: "AGI: PQ1 All function keys are broken after restart"
svn-id: r42658
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index e373dd3e6d..531b0a4ffd 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -489,11 +489,6 @@ int AgiEngine::agiInit() {
_game.mouseFence.setWidth(0); // Reset
- _game.lastController = 0;
- for (i = 0; i < MAX_DIRS; i++)
- _game.controllerOccured[i] = false;
-
-
return ec;
}
@@ -718,6 +713,12 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
_predictiveDictLine = NULL;
_predictiveDictLineCount = 0;
_firstSlot = 0;
+
+ // NOTE: On game reload the keys do not get set again,
+ // thus it is incorrect to reset it in agiInit(). Fixes bug #2823762
+ _game.lastController = 0;
+ for (int i = 0; i < MAX_DIRS; i++)
+ _game.controllerOccured[i] = false;
}
void AgiEngine::initialize() {