COMPOSER: Fix for issue when save_slot is in config.

This commit is contained in:
upthorn 2012-07-28 21:15:38 -07:00 committed by angstsmurf
parent 5649ce55fc
commit 74c75e36ca

View File

@ -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");