aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlolbot-iichan2018-09-16 20:15:04 +0300
committerFilippos Karapetis2018-09-16 20:15:04 +0300
commit4c25af81917ac573b89c94162adfbf956498a46f (patch)
treefcf4b85ee9a0a9014f88cdbe26d44a234bbe96d0
parent2373fd8152eebd1ec3191dafb0169159a637808d (diff)
downloadscummvm-rg350-4c25af81917ac573b89c94162adfbf956498a46f.tar.gz
scummvm-rg350-4c25af81917ac573b89c94162adfbf956498a46f.tar.bz2
scummvm-rg350-4c25af81917ac573b89c94162adfbf956498a46f.zip
WINTERMUTE: Flush ConfMan to disk on every change (#1314)
* WINTERMUTE: Flush ConfMan to disk
-rw-r--r--engines/wintermute/base/base_game.cpp2
-rw-r--r--engines/wintermute/base/saveload.cpp1
2 files changed, 2 insertions, 1 deletions
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();
}
}
}