Refactor GUI options update into a function in Common: updateGameGUIOptions.
svn-id: r42446
This commit is contained in:
parent
88e0fc2c43
commit
51a9bfc9e2
4 changed files with 18 additions and 14 deletions
|
@ -296,13 +296,7 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine)
|
|||
|
||||
// If the GUI options were updated, we catch this here and update them in the users config
|
||||
// file transparently.
|
||||
const uint32 guiOptions = agdDesc->guioptions | params.guioptions;
|
||||
|
||||
if ((guiOptions && !ConfMan.hasKey("guioptions")) ||
|
||||
(ConfMan.hasKey("guioptions") && parseGameGUIOptions(ConfMan.get("guioptions")) != guiOptions)) {
|
||||
ConfMan.set("guioptions", Common::getGameGUIOptionsDescription(guiOptions));
|
||||
ConfMan.flushToDisk();
|
||||
}
|
||||
Common::updateGameGUIOptions(agdDesc->guioptions | params.guioptions);
|
||||
|
||||
debug(2, "Running %s", toGameDescriptor(*agdDesc, params.list).description().c_str());
|
||||
if (!createInstance(syst, engine, agdDesc))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue