diff options
author | Eugene Sandulenko | 2006-04-16 18:17:53 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-04-16 18:17:53 +0000 |
commit | 9de4b02b5ced75709df3b86040472e5b96e08522 (patch) | |
tree | c129927d67f0457625ec445ecb9b95b82ea90fd8 | |
parent | d2efa9fc65ff509fc4d829a5a818f9b8e7e6f1c6 (diff) | |
download | scummvm-rg350-9de4b02b5ced75709df3b86040472e5b96e08522.tar.gz scummvm-rg350-9de4b02b5ced75709df3b86040472e5b96e08522.tar.bz2 scummvm-rg350-9de4b02b5ced75709df3b86040472e5b96e08522.zip |
Patch #1469722: "Game-specific SoundFont configuration broken"
svn-id: r21949
-rw-r--r-- | gui/options.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index d0aa654aec..b2ab109142 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -178,9 +178,15 @@ void OptionsDialog::open() { // 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 @@ void OptionsDialog::close() { } } + // 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 @@ void GlobalOptionsDialog::open() { // 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 @@ void GlobalOptionsDialog::open() { } else { _extraPath->setLabel(extraPath); } - - if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) { - _soundFont->setLabel("None"); - } else { - _soundFont->setLabel(soundFont); - } #endif } |