From 74c75e36cac3c8b93be94c41df72ad1ea1c295fa Mon Sep 17 00:00:00 2001 From: upthorn Date: Sat, 28 Jul 2012 21:15:38 -0700 Subject: COMPOSER: Fix for issue when save_slot is in config. --- engines/composer/composer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/composer') diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index f3e5958304..061ec49151 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -121,6 +121,8 @@ Common::Error ComposerEngine::run() { warning("FPS in book.ini is zero. Defaulting to 8..."); uint32 lastDrawTime = 0; _lastSaveTime = _system->getMillis(); + + bool loadFromLauncher = ConfMan.hasKey("save_slot"); while (!shouldQuit()) { for (uint i = 0; i < _pendingPageChanges.size(); i++) { @@ -170,9 +172,9 @@ Common::Error ComposerEngine::run() { } else if (_needsUpdate) { redraw(); } - if (ConfMan.hasKey("save_slot")) { + if (loadFromLauncher) { loadGameState(ConfMan.getInt("save_slot")); - ConfMan.removeKey("save_slot", Common::ConfigManager::kTransientDomain); + loadFromLauncher = false; } if (shouldPerformAutoSave(_lastSaveTime)) saveGameState(0, "Autosave"); -- cgit v1.2.3