diff options
author | Eugene Sandulenko | 2010-06-15 10:56:46 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-06-15 10:56:46 +0000 |
commit | 8dcc49251f08492968ddfcbb825bfe0a17d0747b (patch) | |
tree | de1fd71f554d45cbff91cc0ff2818d14f73654d3 /gui | |
parent | dc57c684547bab8368d05a3822d1848d62211dd0 (diff) | |
download | scummvm-rg350-8dcc49251f08492968ddfcbb825bfe0a17d0747b.tar.gz scummvm-rg350-8dcc49251f08492968ddfcbb825bfe0a17d0747b.tar.bz2 scummvm-rg350-8dcc49251f08492968ddfcbb825bfe0a17d0747b.zip |
GUI: Disable AdLib controls if game does not support it.
svn-id: r49785
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 62262bf782..b00886b40e 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -493,8 +493,18 @@ void OptionsDialog::setAudioSettingsState(bool enabled) { _midiPopUpDesc->setEnabled(enabled); _midiPopUp->setEnabled(enabled); - _oplPopUpDesc->setEnabled(enabled); - _oplPopUp->setEnabled(enabled); + + uint32 allFlags = MidiDriver::midiDriverFlags2GUIO(~0ul); + + if (_domain != Common::ConfigManager::kApplicationDomain && // global dialog + (_guioptions & allFlags) && // No flags are specified + !(_guioptions & Common::GUIO_MIDIADLIB)) { + _oplPopUpDesc->setEnabled(false); + _oplPopUp->setEnabled(false); + } else { + _oplPopUpDesc->setEnabled(enabled); + _oplPopUp->setEnabled(enabled); + } _outputRatePopUpDesc->setEnabled(enabled); _outputRatePopUp->setEnabled(enabled); } |