Fix invalid pop up widget selection, when no "opl_driver" setting is present.

svn-id: r40506
This commit is contained in:
Johannes Schickel 2009-05-12 19:36:09 +00:00
parent 9c18a12fa0
commit 68c7aa7ff1

View File

@ -183,8 +183,10 @@ void OptionsDialog::open() {
_midiPopUp->setSelectedTag(id);
}
if (_oplPopUp)
_oplPopUp->setSelectedTag(OPL::Config::parse(ConfMan.get("opl_driver", _domain)));
if (_oplPopUp) {
OPL::Config::DriverId id = MAX<OPL::Config::DriverId>(OPL::Config::parse(ConfMan.get("opl_driver", _domain)), 0);
_oplPopUp->setSelectedTag(id);
}
if (_outputRatePopUp) {
_outputRatePopUp->setSelected(1);