[Scummvm-cvs-logs] CVS: scummvm/backends/midi seq.cpp,1.13,1.14

Jonathan Gray khalek at users.sourceforge.net
Sat Nov 5 17:24:54 CET 2005


Update of /cvsroot/scummvm/scummvm/backends/midi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27235

Modified Files:
	seq.cpp 
Log Message:
Default to /dev/sequencer before /dev/null if no MIDI device
is specified.


Index: seq.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/seq.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- seq.cpp	18 Oct 2005 01:30:13 -0000	1.13
+++ seq.cpp	6 Nov 2005 01:23:40 -0000	1.14
@@ -59,17 +59,23 @@
 }
 
 int MidiDriver_SEQ::open() {
+	char *device_name;
+	char dev_seq[] = "/dev/sequencer";
+
 	if (_isOpen)
 		return MERR_ALREADY_OPEN;
 	_isOpen = true;
 	device = 0;
 
-	char *device_name = getenv("SCUMMVM_MIDI");
-	if (device_name != NULL) {
-		device = (::open((device_name), O_RDWR, 0));
-	} else {
-		warning("You need to set-up the SCUMMVM_MIDI environment variable properly (see README) ");
+	device_name = getenv("SCUMMVM_MIDI");
+
+	if (device_name == NULL) {
+		warning("SCUMMVM_MIDI environment variable not set, using /dev/sequencer");
+		device_name = dev_seq;
 	}
+
+	device = (::open((device_name), O_RDWR, 0));
+
 	if ((device_name == NULL) || (device < 0)) {
 		if (device_name == NULL)
 			warning("Opening /dev/null (no music will be heard) ");





More information about the Scummvm-git-logs mailing list