aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2009-05-12 18:42:44 +0000
committerJohannes Schickel2009-05-12 18:42:44 +0000
commit4f0768b9096aab65961d697ca60d6e939f36eae2 (patch)
treecdd956f755a04eb23c140913a0e681ad6094b79b /gui
parent938db170f3af6eaade05fec36edc8011e155422f (diff)
downloadscummvm-rg350-4f0768b9096aab65961d697ca60d6e939f36eae2.tar.gz
scummvm-rg350-4f0768b9096aab65961d697ca60d6e939f36eae2.tar.bz2
scummvm-rg350-4f0768b9096aab65961d697ca60d6e939f36eae2.zip
- Add support for selecting the OPL emulator being used (config entry: "opl_driver")
- Make MAME FM OPL the default emulator again - Add GUI support for selecting the active OPL emulator - Update themes svn-id: r40496
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp31
-rw-r--r--gui/options.h1
-rw-r--r--gui/themes/default.inc6
-rw-r--r--gui/themes/scummclassic.zipbin45619 -> 45730 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx3
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx3
-rw-r--r--gui/themes/scummmodern.zipbin148830 -> 148944 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx3
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx3
9 files changed, 50 insertions, 0 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 956c0d8cf6..c152a3a266 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -40,6 +40,7 @@
#include "sound/mididrv.h"
#include "sound/mixer.h"
+#include "sound/fmopl.h"
namespace GUI {
@@ -102,6 +103,7 @@ void OptionsDialog::init() {
_aspectCheckbox = 0;
_enableAudioSettings = false;
_midiPopUp = 0;
+ _oplPopUp = 0;
_outputRatePopUp = 0;
_enableMIDISettings = false;
_multiMidiCheckbox = 0;
@@ -181,6 +183,9 @@ void OptionsDialog::open() {
_midiPopUp->setSelectedTag(id);
}
+ if (_oplPopUp)
+ _oplPopUp->setSelectedTag(OPL::Config::parse(ConfMan.get("opl_driver", _domain)));
+
if (_outputRatePopUp) {
_outputRatePopUp->setSelected(1);
int value = ConfMan.getInt("output_rate", _domain);
@@ -315,6 +320,21 @@ void OptionsDialog::close() {
}
}
+ if (_oplPopUp) {
+ if (_enableAudioSettings) {
+ const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable();
+ while (ed->name && ed->id != (int)_oplPopUp->getSelectedTag())
+ ++ed;
+
+ if (ed->name)
+ ConfMan.set("opl_driver", ed->name, _domain);
+ else
+ ConfMan.removeKey("opl_driver", _domain);
+ } else {
+ ConfMan.removeKey("opl_driver", _domain);
+ }
+ }
+
if (_outputRatePopUp) {
if (_enableAudioSettings) {
if (_outputRatePopUp->getSelectedTag() != 0)
@@ -457,6 +477,7 @@ void OptionsDialog::setAudioSettingsState(bool enabled) {
_enableAudioSettings = enabled;
_midiPopUp->setEnabled(enabled);
+ _oplPopUp->setEnabled(enabled);
_outputRatePopUp->setEnabled(enabled);
}
@@ -545,6 +566,16 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const String &prefix) {
md++;
}
+ // The OPL emulator popup & a label
+ _oplPopUp = new PopUpWidget(boss, prefix + "auOPLPopup", "AdLib emulator:");
+
+ // Populate it
+ const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable();
+ while (ed->name) {
+ _oplPopUp->appendEntry(ed->description, ed->id);
+ ++ed;
+ }
+
// Sample rate settings
_outputRatePopUp = new PopUpWidget(boss, prefix + "auSampleRatePopup", "Output rate:");
diff --git a/gui/options.h b/gui/options.h
index aca5db83cd..53fc5e2d01 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -101,6 +101,7 @@ private:
//
bool _enableAudioSettings;
PopUpWidget *_midiPopUp;
+ PopUpWidget *_oplPopUp;
PopUpWidget *_outputRatePopUp;
//
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index d5fcd8e6eb..ddb8127d77 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -475,6 +475,9 @@
"<widget name='auMidiPopup' "
"type='PopUp' "
"/> "
+"<widget name='auOPLPopup' "
+"type='PopUp' "
+"/> "
"<widget name='auSampleRatePopup' "
"type='PopUp' "
"/> "
@@ -1115,6 +1118,9 @@
"<widget name='auMidiPopup' "
"type='PopUp' "
"/> "
+"<widget name='auOPLPopup' "
+"type='PopUp' "
+"/> "
"<widget name='auSampleRatePopup' "
"type='PopUp' "
"/> "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index ad886efd12..798f4d292f 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 4d7698f306..bb7fdc20a2 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -186,6 +186,9 @@
<widget name = 'auMidiPopup'
type = 'PopUp'
/>
+ <widget name = 'auOPLPopup'
+ type = 'PopUp'
+ />
<widget name = 'auSampleRatePopup'
type = 'PopUp'
/>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 33401966c4..c144f0bad3 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -183,6 +183,9 @@
<widget name = 'auMidiPopup'
type = 'PopUp'
/>
+ <widget name = 'auOPLPopup'
+ type = 'PopUp'
+ />
<widget name = 'auSampleRatePopup'
type = 'PopUp'
/>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index eb0f890f15..a67b11f244 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 6377cc48ae..736fce87f2 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -201,6 +201,9 @@
<widget name = 'auMidiPopup'
type = 'PopUp'
/>
+ <widget name = 'auOPLPopup'
+ type = 'PopUp'
+ />
<widget name = 'auSampleRatePopup'
type = 'PopUp'
/>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 36ed3f25fa..bf19b48485 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -181,6 +181,9 @@
<widget name = 'auMidiPopup'
type = 'PopUp'
/>
+ <widget name = 'auOPLPopup'
+ type = 'PopUp'
+ />
<widget name = 'auSampleRatePopup'
type = 'PopUp'
/>