[Scummvm-cvs-logs] SF.net SVN: scummvm:[51107] scummvm/trunk/gui/options.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Jul 21 22:37:47 CEST 2010


Revision: 51107
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51107&view=rev
Author:   lordhoto
Date:     2010-07-21 20:37:46 +0000 (Wed, 21 Jul 2010)

Log Message:
-----------
GUI: Properly show external MIDI devices.

Formerly in case a game only specified GUIO_MIDIMT32, only the MT-32 Emulator
was shown, since that is the only device which is of type MT_MT32. All
external MIDI devices are currently only flagged with MT_GM.

Modified Paths:
--------------
    scummvm/trunk/gui/options.cpp

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2010-07-21 20:28:53 UTC (rev 51106)
+++ scummvm/trunk/gui/options.cpp	2010-07-21 20:37:46 UTC (rev 51107)
@@ -657,9 +657,15 @@
 	for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) {
 		MusicDevices i = (**m)->getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
+			const uint32 deviceGuiOption = MidiDriver::musicType2GUIO(d->getMusicType());
+
 			if ((_domain == Common::ConfigManager::kApplicationDomain && d->getMusicType() != MT_TOWNS) // global dialog - skip useless FM-Towns option there
 			    || (_domain != Common::ConfigManager::kApplicationDomain && !(_guioptions & allFlags)) // No flags are specified
-			    || _guioptions & (MidiDriver::musicType2GUIO(d->getMusicType())) // flag is present
+			    || (_guioptions & deviceGuiOption) // flag is present
+			    // HACK/FIXME: For now we have to show GM devices, even when the game only has GUIO_MIDIMT32 set,
+			    // else we would not show for example external devices connected via ALSA, since they are always
+			    // marked as General MIDI device.
+			    || (deviceGuiOption == Common::GUIO_MIDIGM && (_guioptions & Common::GUIO_MIDIMT32))
 			    || d->getMusicDriverId() == "auto" || d->getMusicDriverId() == "null") // always add default and null device
 					_midiPopUp->appendEntry(d->getCompleteName(), d->getHandle());
 


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