[Scummvm-cvs-logs] SF.net SVN: scummvm:[51297] scummvm/trunk/sound/mididrv.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Mon Jul 26 08:19:57 CEST 2010
Revision: 51297
http://scummvm.svn.sourceforge.net/scummvm/?rev=51297&view=rev
Author: eriktorbjorn
Date: 2010-07-26 06:19:57 +0000 (Mon, 26 Jul 2010)
Log Message:
-----------
MIDI: Make it possible to specify MIDI device by music driver id
If getDeviceHandle() gets a music driver id it will pick the driver's
first device, which should hopefully be a sensible default. E.g. it's
once again possible to use "-e alsa" rather than the much more
cumbersome "-e 'alsa_Emu10k1 WaveTable'".
Modified Paths:
--------------
scummvm/trunk/sound/mididrv.cpp
Modified: scummvm/trunk/sound/mididrv.cpp
===================================================================
--- scummvm/trunk/sound/mididrv.cpp 2010-07-26 06:10:47 UTC (rev 51296)
+++ scummvm/trunk/sound/mididrv.cpp 2010-07-26 06:19:57 UTC (rev 51297)
@@ -266,7 +266,10 @@
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++) {
- if (identifier.equals(d->getCompleteId()) || identifier.equals(d->getCompleteName())) {
+ // The music driver id isn't unique, but it will match
+ // driver's first device. This is useful when selecting
+ // the driver from the command line.
+ if (identifier.equals(d->getMusicDriverId()) || identifier.equals(d->getCompleteId()) || identifier.equals(d->getCompleteName())) {
return 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