[Scummvm-cvs-logs] CVS: scummvm/gui options.cpp,1.20,1.21

Jamieson Christian jamieson630 at users.sourceforge.net
Tue Jun 10 23:50:16 CEST 2003


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv22626/scummvm/gui

Modified Files:
	options.cpp 
Log Message:
Fix for bug [741592] GUI: Switching music driver mixes up music
Implement true music driver selection from the GUI options dialog.

This implementation depends on a new, transient config domain called
"user-overrides". Probably any other config changes made from the
options dialog will need to go into this domain, which is now
loaded after the game settings are loaded.

I hope this is the right way to do it. I'm still a little fuzzy
about our game settings architecture. If anybody suddenly gets
a "[user-overrides]" section showing up in their scummvm.ini or
scummvm.rc files, you'll know why.

Index: options.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- options.cpp	29 May 2003 18:30:40 -0000	1.20
+++ options.cpp	11 Jun 2003 06:49:47 -0000	1.21
@@ -205,8 +205,13 @@
 		break;
 	case kPopUpItemSelectedCmd:
 		if (sender == _midiPopUp) {
-			_detector._midi_driver = (int)data;
-			printf("Setting _detector._midi_driver to %d\n", _detector._midi_driver);
+			const MusicDriver *md = GameDetector::getMusicDrivers();
+			for (; md->name; md++) {
+				if (md->id == (int) data) {
+					g_config->set ("music_driver", md->name, "user-overrides");
+					break;
+				}
+			}
 		}
 		break;
 	case kOKCmd:





More information about the Scummvm-git-logs mailing list