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

Jonathan Gray khalek at users.sourceforge.net
Wed Jan 25 19:07:00 CET 2006


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

Modified Files:
      Tag: branch-0-8-0
	seq.cpp 
Log Message:
Backport defaulting to /dev/sequencer instead of /dev/null.


Index: seq.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/seq.cpp,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -d -r1.12.2.2 -r1.12.2.3
--- seq.cpp	18 Jan 2006 18:07:23 -0000	1.12.2.2
+++ seq.cpp	26 Jan 2006 03:05:56 -0000	1.12.2.3
@@ -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