[Scummvm-git-logs] scummvm master -> 8bb2afd217d8171f2f4431a7c1a63c1f0cc9e20f
sev-
noreply at scummvm.org
Mon Aug 28 20:06:24 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8bb2afd217 AUDIO: Change default GM device to "auto"
Commit: 8bb2afd217d8171f2f4431a7c1a63c1f0cc9e20f
https://github.com/scummvm/scummvm/commit/8bb2afd217d8171f2f4431a7c1a63c1f0cc9e20f
Author: elasota (ejlasota at gmail.com)
Date: 2023-08-28T22:06:19+02:00
Commit Message:
AUDIO: Change default GM device to "auto"
Changed paths:
audio/mididrv.cpp
base/commandLine.cpp
gui/options.cpp
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 1768389d344..1ae51447b00 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -250,13 +250,12 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
if (flags & MDT_PREFER_MT32)
devStr = ConfMan.hasKey("mt32_device") ? ConfMan.get("mt32_device") : Common::String("null");
else if (flags & MDT_PREFER_GM)
- devStr = ConfMan.hasKey("gm_device") ? ConfMan.get("gm_device") : Common::String("null");
- else
+ devStr = ConfMan.get("gm_device");
+
+ if (devStr.empty())
devStr = "auto";
- // Default to Null device here, since we also register a default null setting for
- // the MT32 or GM device in the config manager.
- hdl = getDeviceHandle(devStr.empty() ? Common::String("null") : devStr);
+ hdl = getDeviceHandle(devStr);
const MusicType type = getMusicType(hdl);
// If we have a "Don't use GM/MT-32" setting we skip this part and jump
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index c4b4d005611..d916b996416 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -321,7 +321,7 @@ void registerDefaults() {
ConfMan.registerDefault("music_driver", "auto");
ConfMan.registerDefault("mt32_device", "null");
- ConfMan.registerDefault("gm_device", "null");
+ ConfMan.registerDefault("gm_device", "auto");
ConfMan.registerDefault("opl2lpt_parport", "null");
ConfMan.registerDefault("cdrom", 0);
diff --git a/gui/options.cpp b/gui/options.cpp
index 9701a347ad5..377a898d009 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -483,7 +483,7 @@ void OptionsDialog::build() {
if (_multiMidiCheckbox) {
if (!loadMusicDeviceSetting(_gmDevicePopUp, "gm_device"))
- _gmDevicePopUp->setSelected(0);
+ _gmDevicePopUp->setSelected(1);
// Multi midi setting
_multiMidiCheckbox->setState(ConfMan.getBool("multi_midi", _domain));
More information about the Scummvm-git-logs
mailing list