aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/options.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 9857d8b8d6..7f132f32f1 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -364,9 +364,15 @@ void OptionsDialog::close() {
}
// Audio options
- saveMusicDeviceSetting(_midiPopUp, "music_driver", musicDeviceSkipSettingDefault);
- saveMusicDeviceSetting(_mt32DevicePopUp, "mt32_device", musicDeviceSkipSettingSpec);
- saveMusicDeviceSetting(_gmDevicePopUp, "gm_device", musicDeviceSkipSettingSpec);
+ if (_enableAudioSettings) {
+ saveMusicDeviceSetting(_midiPopUp, "music_driver", musicDeviceSkipSettingDefault);
+ saveMusicDeviceSetting(_mt32DevicePopUp, "mt32_device", musicDeviceSkipSettingSpec);
+ saveMusicDeviceSetting(_gmDevicePopUp, "gm_device", musicDeviceSkipSettingSpec);
+ } else {
+ ConfMan.removeKey("music_driver", _domain);
+ ConfMan.removeKey("mt32_device", _domain);
+ ConfMan.removeKey("gm_device", _domain);
+ }
if (_oplPopUp) {
if (_enableAudioSettings) {