diff options
author | Johannes Schickel | 2010-06-29 00:30:16 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-06-29 00:30:16 +0000 |
commit | a254d29741681500fffa5609c0a2f6f10339352b (patch) | |
tree | 6bb5c3a4e65f9374b32fb46763456e08c1fac557 /sound/mididrv.cpp | |
parent | 19abacc77a5e7e00f9315926a19ef2870e87a5d9 (diff) | |
download | scummvm-rg350-a254d29741681500fffa5609c0a2f6f10339352b.tar.gz scummvm-rg350-a254d29741681500fffa5609c0a2f6f10339352b.tar.bz2 scummvm-rg350-a254d29741681500fffa5609c0a2f6f10339352b.zip |
Yet another slight fix for the fallback detection.
Before in case MDT_PREFER_MT32 nor MDT_PREFER_GM was specified
the code used "auto" as key name for ConfMan.get, instead of
passing "auto" directly to getDeviceHandle.
svn-id: r50472
Diffstat (limited to 'sound/mididrv.cpp')
-rw-r--r-- | sound/mididrv.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index c1b2331b74..0a2dbb4447 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -182,7 +182,12 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) { for (int l = (flags & (MDT_PREFER_GM | MDT_PREFER_MT32)) ? 1 : 0; l < 2; ++l) { if ((flags & MDT_MIDI) && (l == 1)) { // If a preferred MT32 or GM device has been selected that device gets returned - hdl = getDeviceHandle(ConfMan.get((flags & MDT_PREFER_MT32) ? "mt32_device" : ((flags & MDT_PREFER_GM) ? "gm_device" : "auto"))); + if (flags & MDT_PREFER_MT32) + hdl = getDeviceHandle(ConfMan.get("mt32_device")); + else if (flags & MDT_PREFER_GM) + hdl = getDeviceHandle(ConfMan.get("gm_device")); + else + hdl = getDeviceHandle("auto"); const MusicType type = getMusicType(hdl); if (type != MT_AUTO && type != MT_INVALID) { |