aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-02-11 15:36:13 +0000
committerFilippos Karapetis2009-02-11 15:36:13 +0000
commitb2a085b26d342fbae37994e8d44461a04a8acfba (patch)
treef5f6c25e8f70fbdbb5cb0b7ed672cc13993886d4
parenta898c4290cd31d1f6851ae0ca0c58a7f58822ce2 (diff)
downloadscummvm-rg350-b2a085b26d342fbae37994e8d44461a04a8acfba.tar.gz
scummvm-rg350-b2a085b26d342fbae37994e8d44461a04a8acfba.tar.bz2
scummvm-rg350-b2a085b26d342fbae37994e8d44461a04a8acfba.zip
Fix for bug #2538123 - "AGI: loading from launcher disables hotkeys"
svn-id: r36266
-rw-r--r--engines/agi/cycle.cpp9
-rw-r--r--engines/agi/menu.cpp5
2 files changed, 9 insertions, 5 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 53bebf1b40..49d7930972 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -330,6 +330,8 @@ int AgiEngine::playGame() {
_game.vars[vKey] = 0;
debugC(2, kDebugLevelMain, "Entering main loop");
+ bool firstLoop = true;
+
do {
if (!mainCycle())
@@ -345,6 +347,13 @@ int AgiEngine::playGame() {
}
interpretCycle();
+
+ // Check if the user has asked to load a game from the command line
+ // or the launcher
+ if (firstLoop) {
+ checkQuickLoad();
+ firstLoop = false;
+ }
setflag(fEnteredCli, false);
setflag(fSaidAcceptedInput, false);
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index cad3da5721..916c4c184f 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -260,11 +260,6 @@ void Menu::submit() {
--iter;
}
}
-
- // We need to wait till the main menu is submitted by the game scripts
- // before checking if we can start loading a save game from the command line.
- // Menu initialization and submital takes place when the game starts only
- _vm->checkQuickLoad();
}
bool Menu::keyhandler(int key) {