aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2010-06-15 10:56:12 +0000
committerEugene Sandulenko2010-06-15 10:56:12 +0000
commit67bc7115804b6f256f776fc761f7fffffa901c31 (patch)
tree56ca91c3a8a3ab0fb3d7154f9fb43fecae0aba90 /gui
parent2bcafcb02dd406a36fd0a11c6b0df742840a9a7e (diff)
downloadscummvm-rg350-67bc7115804b6f256f776fc761f7fffffa901c31.tar.gz
scummvm-rg350-67bc7115804b6f256f776fc761f7fffffa901c31.tar.bz2
scummvm-rg350-67bc7115804b6f256f776fc761f7fffffa901c31.zip
GUI: Implement MIDI drivers as GUI options.
Proper version of patch #2988641: "GSoC: Select drivers in GUI based on output types". So far only SCUMM engine supports this feature. svn-id: r49783
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index ad32bfd4e3..62262bf782 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -613,8 +613,13 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
// Populate it
const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
+ uint32 allFlags = MidiDriver::midiDriverFlags2GUIO(~0ul);
+
while (md->name) {
- _midiPopUp->appendEntry(_(md->description), md->id);
+ if (_domain == Common::ConfigManager::kApplicationDomain || // global dialog
+ !(_guioptions & allFlags) || // No flags are specified
+ _guioptions & (MidiDriver::midiDriverFlags2GUIO(md->flags))) // flag is present
+ _midiPopUp->appendEntry(_(md->description), md->id);
md++;
}