aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
authorJamieson Christian2003-06-11 06:49:47 +0000
committerJamieson Christian2003-06-11 06:49:47 +0000
commitc117ef1e5082bdd831c2412b20ddeb3b2056ff63 (patch)
tree19152e995eaf05621379457eb0a866bb175775da /gui/options.cpp
parent01ba60ccef360f81460900154f9e35265fb40618 (diff)
downloadscummvm-rg350-c117ef1e5082bdd831c2412b20ddeb3b2056ff63.tar.gz
scummvm-rg350-c117ef1e5082bdd831c2412b20ddeb3b2056ff63.tar.bz2
scummvm-rg350-c117ef1e5082bdd831c2412b20ddeb3b2056ff63.zip
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. svn-id: r8434
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index b4806e033f..ecfbc5e836 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -205,8 +205,13 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
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: