diff options
author | Filippos Karapetis | 2007-10-31 21:28:33 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-10-31 21:28:33 +0000 |
commit | 39da7deefb0b55412d871165c563d0a11dcfe61f (patch) | |
tree | dc0e1d262ac15ff2268af93376de1f2c9b7731c3 /engines/agi/agi.cpp | |
parent | 5add473048289ed235d69825cfc44a84a24118af (diff) | |
download | scummvm-rg350-39da7deefb0b55412d871165c563d0a11dcfe61f.tar.gz scummvm-rg350-39da7deefb0b55412d871165c563d0a11dcfe61f.tar.bz2 scummvm-rg350-39da7deefb0b55412d871165c563d0a11dcfe61f.zip |
Fix for bug #1751483 - "AGI: The -x command-line option appears to be broken"
svn-id: r29346
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r-- | engines/agi/agi.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index d78a2dc587..a8d521ff69 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -247,6 +247,19 @@ void AgiEngine::processEvents() { } } +void AgiEngine::checkQuickLoad() { + if (ConfMan.hasKey("save_slot")) { + char saveNameBuffer[256]; + + snprintf (saveNameBuffer, 256, "%s.%03d", _targetName.c_str(), ConfMan.getInt("save_slot")); + + if (loadGame(saveNameBuffer, false) == errOK) { // Do not check game id + _game.exitAllLogics = 1; + _menu->enableAll(); + } + } +} + int AgiEngine::agiIsKeypressLow() { processEvents(); return _keyQueueStart != _keyQueueEnd; @@ -437,15 +450,6 @@ int AgiEngine::agiInit() { if (ec == errOK) ec = _loader->loadResource(rLOGIC, 0); - - if (ConfMan.hasKey("save_slot")) { - char saveNameBuffer[256]; - - snprintf (saveNameBuffer, 256, "%s.%03d", _targetName.c_str(), ConfMan.getInt("save_slot")); - - loadGame(saveNameBuffer, false); // Do not check game id - } - #ifdef __DS__ // Normally, the engine loads the predictive text dictionary when the predictive dialog // is shown. On the DS version, the word completion feature needs the dictionary too. |