WINTERMUTE: Flush ConfMan to disk on every change (#1314)

* WINTERMUTE: Flush ConfMan to disk
This commit is contained in:
lolbot-iichan 2018-09-16 20:15:04 +03:00 committed by Filippos Karapetis
parent 2373fd8152
commit 4c25af8191
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -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();
}
}
}