[Scummvm-cvs-logs] SF.net SVN: scummvm:[50472] scummvm/trunk/sound/mididrv.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Jun 29 02:30:16 CEST 2010


Revision: 50472
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50472&view=rev
Author:   lordhoto
Date:     2010-06-29 00:30:16 +0000 (Tue, 29 Jun 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/sound/mididrv.cpp

Modified: scummvm/trunk/sound/mididrv.cpp
===================================================================
--- scummvm/trunk/sound/mididrv.cpp	2010-06-29 00:29:57 UTC (rev 50471)
+++ scummvm/trunk/sound/mididrv.cpp	2010-06-29 00:30:16 UTC (rev 50472)
@@ -182,7 +182,12 @@
 	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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list