[Scummvm-cvs-logs] SF.net SVN: scummvm: [22763] scummvm/trunk/gui

sev at users.sourceforge.net sev at users.sourceforge.net
Mon May 29 18:43:00 CEST 2006


Revision: 22763
Author:   sev
Date:     2006-05-29 18:41:49 -0700 (Mon, 29 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22763&view=rev

Log Message:
-----------
Fix bug #1496582 "GUI: Default graphics mode not committing".

Modified Paths:
--------------
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/options.cpp
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2006-05-30 01:23:28 UTC (rev 22762)
+++ scummvm/trunk/gui/launcher.cpp	2006-05-30 01:41:49 UTC (rev 22763)
@@ -291,10 +291,13 @@
 
 	const Common::LanguageDescription *l = Common::g_languages;
 	const Common::Language lang = Common::parseLanguage(ConfMan.get("language", _domain));
+
 	sel = 0;
-	for (i = 0; l->code; ++l, ++i) {
-		if (lang == l->id)
-			sel = i + 2;
+	if (ConfMan.hasKey("language", _domain)) {
+		for (i = 0; l->code; ++l, ++i) {
+			if (lang == l->id)
+				sel = i + 2;
+		}
 	}
 	_langPopUp->setSelected(sel);
 

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2006-05-30 01:23:28 UTC (rev 22762)
+++ scummvm/trunk/gui/options.cpp	2006-05-30 01:41:49 UTC (rev 22763)
@@ -242,17 +242,22 @@
 				ConfMan.setBool("fullscreen", _fullscreenCheckbox->getState(), _domain);
 				ConfMan.setBool("aspect_ratio", _aspectCheckbox->getState(), _domain);
 
+				bool isSet = false;
+
 				if ((int32)_gfxPopUp->getSelectedTag() >= 0) {
 					const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
 
 					while (gm->name) {
 						if (gm->id == (int)_gfxPopUp->getSelectedTag()) {
 							ConfMan.set("gfx_mode", gm->name, _domain);
+							isSet = true;
 							break;
 						}
 						gm++;
 					}
 				}
+				if (!isSet)
+					ConfMan.removeKey("gfx_mode", _domain);
 
 				if ((int32)_renderModePopUp->getSelectedTag() >= 0)
 					ConfMan.set("render_mode", Common::getRenderModeCode((Common::RenderMode)_renderModePopUp->getSelectedTag()), _domain);


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