From 88e0fc2c43a9f8b1c729bf2f509815601b4d495d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 13 Jul 2009 18:32:03 +0000 Subject: Add transparent GUI options update for SCUMM too. svn-id: r42445 --- engines/scumm/detection.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/scumm/detection.cpp') diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index cf88ded3b8..e1de825049 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -882,6 +882,16 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co if (res.game.platform == Common::kPlatformFMTowns && res.game.version == 3) res.game.midi = MDT_TOWNS; + // If the GUI options were updated, we catch this here and update them in the users config + // file transparently. + const uint32 guiOptions = res.game.guioptions; + + if ((guiOptions && !ConfMan.hasKey("guioptions")) || + (ConfMan.hasKey("guioptions") && parseGameGUIOptions(ConfMan.get("guioptions")) != guiOptions)) { + ConfMan.set("guioptions", Common::getGameGUIOptionsDescription(guiOptions)); + ConfMan.flushToDisk(); + } + // Finally, we have massaged the GameDescriptor to our satisfaction, and can // instantiate the appropriate game engine. Hooray! switch (res.game.version) { -- cgit v1.2.3 From 51a9bfc9e2881aa7c7ddaa9cc6b2709acab5e725 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 13 Jul 2009 18:47:32 +0000 Subject: Refactor GUI options update into a function in Common: updateGameGUIOptions. svn-id: r42446 --- engines/scumm/detection.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'engines/scumm/detection.cpp') diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index e1de825049..5fa74d22c3 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -884,13 +884,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co // If the GUI options were updated, we catch this here and update them in the users config // file transparently. - const uint32 guiOptions = res.game.guioptions; - - if ((guiOptions && !ConfMan.hasKey("guioptions")) || - (ConfMan.hasKey("guioptions") && parseGameGUIOptions(ConfMan.get("guioptions")) != guiOptions)) { - ConfMan.set("guioptions", Common::getGameGUIOptionsDescription(guiOptions)); - ConfMan.flushToDisk(); - } + Common::updateGameGUIOptions(res.game.guioptions); // Finally, we have massaged the GameDescriptor to our satisfaction, and can // instantiate the appropriate game engine. Hooray! -- cgit v1.2.3