aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2010-06-15 10:56:46 +0000
committerEugene Sandulenko2010-06-15 10:56:46 +0000
commit8dcc49251f08492968ddfcbb825bfe0a17d0747b (patch)
treede1fd71f554d45cbff91cc0ff2818d14f73654d3 /gui
parentdc57c684547bab8368d05a3822d1848d62211dd0 (diff)
downloadscummvm-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.cpp14
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);
}