[Scummvm-cvs-logs] SF.net SVN: scummvm:[42445] scummvm/trunk/engines/scumm/detection.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Jul 13 20:32:03 CEST 2009


Revision: 42445
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42445&view=rev
Author:   lordhoto
Date:     2009-07-13 18:32:03 +0000 (Mon, 13 Jul 2009)

Log Message:
-----------
Add transparent GUI options update for SCUMM too.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/detection.cpp

Modified: scummvm/trunk/engines/scumm/detection.cpp
===================================================================
--- scummvm/trunk/engines/scumm/detection.cpp	2009-07-13 18:31:42 UTC (rev 42444)
+++ scummvm/trunk/engines/scumm/detection.cpp	2009-07-13 18:32:03 UTC (rev 42445)
@@ -882,6 +882,16 @@
 	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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list