[Scummvm-cvs-logs] SF.net SVN: scummvm: [21949] scummvm/trunk/gui/options.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Apr 16 11:19:03 CEST 2006


Revision: 21949
Author:   sev
Date:     2006-04-16 11:17:53 -0700 (Sun, 16 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21949&view=rev

Log Message:
-----------
Patch #1469722: "Game-specific SoundFont configuration broken"

Modified Paths:
--------------
    scummvm/trunk/gui/options.cpp
Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2006-04-16 17:53:37 UTC (rev 21948)
+++ scummvm/trunk/gui/options.cpp	2006-04-16 18:17:53 UTC (rev 21949)
@@ -178,9 +178,15 @@
 
 		// GS extensions setting
 		_enableGSCheckbox->setState(ConfMan.getBool("enable_gs", _domain));
+
+		String soundFont(ConfMan.get("soundfont", _domain));
+		if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain))
+			_soundFont->setLabel("None");
+		else
+			_soundFont->setLabel(soundFont);
 	}
 
-
+	// Volume options
 	if (_musicVolumeSlider) {
 		int vol;
 
@@ -246,15 +252,21 @@
 			}
 		}
 
+		// MIDI options
 		if (_multiMidiCheckbox) {
 			if (_enableMIDISettings) {
 				ConfMan.set("multi_midi", _multiMidiCheckbox->getState(), _domain);
 				ConfMan.set("native_mt32", _mt32Checkbox->getState(), _domain);
 				ConfMan.set("enable_gs", _enableGSCheckbox->getState(), _domain);
+
+				String soundFont = _soundFont->getLabel();
+				if (!soundFont.empty() && (soundFont != "None"))
+					ConfMan.set("soundfont", soundFont, _domain);
 			} else {
 				ConfMan.removeKey("multi_midi", _domain);
 				ConfMan.removeKey("native_mt32", _domain);
 				ConfMan.removeKey("enable_gs", _domain);
+				ConfMan.removeKey("soundfont", _domain);
 			}
 		}
 
@@ -513,7 +525,6 @@
 	// Set _savePath to the current save path
 	Common::String dir(ConfMan.get("savepath", _domain));
 	Common::String extraPath(ConfMan.get("extrapath", _domain));
-	Common::String soundFont(ConfMan.get("soundfont", _domain));
 
 	if (!dir.empty()) {
 		_savePath->setLabel(dir);
@@ -529,12 +540,6 @@
 	} else {
 		_extraPath->setLabel(extraPath);
 	}
-
-	if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) {
-		_soundFont->setLabel("None");
-	} else {
-		_soundFont->setLabel(soundFont);
-	}
 #endif
 }
 


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