diff options
-rw-r--r-- | gui/options.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 726b89d437..ba247e5f15 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -445,11 +445,9 @@ void OptionsDialog::close() { if (_oplPopUp) { if (_enableAudioSettings) { - const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable(); - while (ed->name && ed->id != (int)_oplPopUp->getSelectedTag()) - ++ed; + const OPL::Config::EmulatorDescription *ed = OPL::Config::findDriver(_oplPopUp->getSelectedTag()); - if (ed->name) + if (ed) ConfMan.set("opl_driver", ed->name, _domain); else ConfMan.removeKey("opl_driver", _domain); |