aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2011-10-23 19:42:25 +0100
committerEugene Sandulenko2011-10-23 23:44:14 +0100
commitf1165b0b6ead53b68443c649cc544016ad119b1d (patch)
tree2130a085eb8c7f7c8a1a092f6dfcaf30e14f7847
parentdbb83da2c935b85962287285b19597834289e0d8 (diff)
downloadscummvm-rg350-f1165b0b6ead53b68443c649cc544016ad119b1d.tar.gz
scummvm-rg350-f1165b0b6ead53b68443c649cc544016ad119b1d.tar.bz2
scummvm-rg350-f1165b0b6ead53b68443c649cc544016ad119b1d.zip
LAUNCHER: Do not show MIDI and MT32 tabs if game does not have MIDI
-rw-r--r--gui/launcher.cpp51
1 files changed, 29 insertions, 22 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 8e94c140a4..4c5a6e3706 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -245,32 +245,35 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
//
// 5) The MIDI tab
//
- tab->addTab(_("MIDI"));
+ if (!_guioptions.contains(GUIO_NOMIDI)) {
+ tab->addTab(_("MIDI"));
- if (g_system->getOverlayWidth() > 320)
- _globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _("Override global MIDI settings"), 0, kCmdGlobalMIDIOverride);
- else
- _globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _c("Override global MIDI settings", "lowres"), 0, kCmdGlobalMIDIOverride);
+ if (g_system->getOverlayWidth() > 320)
+ _globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _("Override global MIDI settings"), 0, kCmdGlobalMIDIOverride);
+ else
+ _globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _c("Override global MIDI settings", "lowres"), 0, kCmdGlobalMIDIOverride);
- if (_guioptions.contains(GUIO_NOMIDI))
_globalMIDIOverride->setEnabled(false);
- addMIDIControls(tab, "GameOptions_MIDI.");
+ addMIDIControls(tab, "GameOptions_MIDI.");
+ }
//
// 6) The MT-32 tab
//
- tab->addTab(_("MT-32"));
+ if (!_guioptions.contains(GUIO_NOMIDI)) {
+ tab->addTab(_("MT-32"));
- if (g_system->getOverlayWidth() > 320)
- _globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _("Override global MT-32 settings"), 0, kCmdGlobalMT32Override);
- else
- _globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _c("Override global MT-32 settings", "lowres"), 0, kCmdGlobalMT32Override);
+ if (g_system->getOverlayWidth() > 320)
+ _globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _("Override global MT-32 settings"), 0, kCmdGlobalMT32Override);
+ else
+ _globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _c("Override global MT-32 settings", "lowres"), 0, kCmdGlobalMT32Override);
- //if (_guioptions.contains(GUIO_NOMIDI))
- // _globalMT32Override->setEnabled(false);
+ //if (_guioptions.contains(GUIO_NOMIDI))
+ // _globalMT32Override->setEnabled(false);
- addMT32Controls(tab, "GameOptions_MT32.");
+ addMT32Controls(tab, "GameOptions_MT32.");
+ }
//
// 7) The Paths tab
@@ -350,14 +353,18 @@ void EditGameDialog::open() {
ConfMan.hasKey("speech_volume", _domain);
_globalVolumeOverride->setState(e);
- e = ConfMan.hasKey("soundfont", _domain) ||
- ConfMan.hasKey("multi_midi", _domain) ||
- ConfMan.hasKey("midi_gain", _domain);
- _globalMIDIOverride->setState(e);
+ if (!_guioptions.contains(GUIO_NOMIDI)) {
+ e = ConfMan.hasKey("soundfont", _domain) ||
+ ConfMan.hasKey("multi_midi", _domain) ||
+ ConfMan.hasKey("midi_gain", _domain);
+ _globalMIDIOverride->setState(e);
+ }
- e = ConfMan.hasKey("native_mt32", _domain) ||
- ConfMan.hasKey("enable_gs", _domain);
- _globalMT32Override->setState(e);
+ if (!_guioptions.contains(GUIO_NOMIDI)) {
+ e = ConfMan.hasKey("native_mt32", _domain) ||
+ ConfMan.hasKey("enable_gs", _domain);
+ _globalMT32Override->setState(e);
+ }
// TODO: game path