From 4c25af81917ac573b89c94162adfbf956498a46f Mon Sep 17 00:00:00 2001 From: lolbot-iichan Date: Sun, 16 Sep 2018 20:15:04 +0300 Subject: WINTERMUTE: Flush ConfMan to disk on every change (#1314) * WINTERMUTE: Flush ConfMan to disk--- engines/wintermute/base/base_game.cpp | 2 +- engines/wintermute/base/saveload.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index 24779b9793..0ef58d588d 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -237,6 +237,7 @@ BaseGame::~BaseGame() { LOG(0, "Shutting down..."); ConfMan.setBool("last_run", true); + ConfMan.flushToDisk(); cleanup(); @@ -3884,7 +3885,6 @@ bool BaseGame::isDoubleClick(int32 buttonIndex) { ////////////////////////////////////////////////////////////////////////// void BaseGame::autoSaveOnExit() { _soundMgr->saveSettings(); - ConfMan.flushToDisk(); if (!_autoSaveOnExit) { return; diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp index 85553a2a53..6299cf6e01 100644 --- a/engines/wintermute/base/saveload.cpp +++ b/engines/wintermute/base/saveload.cpp @@ -101,6 +101,7 @@ bool SaveLoad::saveGame(int slot, const char *desc, bool quickSave, BaseGame *ga pm->putDWORD(BaseEngine::instance().getRandomSource()->getSeed()); if (DID_SUCCEED(ret = pm->saveFile(filename))) { ConfMan.setInt("most_recent_saveslot", slot); + ConfMan.flushToDisk(); } } } -- cgit v1.2.3