[Scummvm-cvs-logs] CVS: scummvm/sound mididrv.cpp,1.9,1.10
Jonathan Gray
khalek at users.sourceforge.net
Thu Oct 10 01:27:01 CEST 2002
Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv19833
Modified Files:
mididrv.cpp
Log Message:
default port for alsa if env var isn't set
Index: mididrv.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mididrv.cpp 2 Oct 2002 23:31:40 -0000 1.9
+++ mididrv.cpp 10 Oct 2002 08:26:00 -0000 1.10
@@ -1103,13 +1103,17 @@
return MERR_STREAMING_NOT_AVAILABLE;
if (!(var = getenv("SCUMMVM_PORT"))) {
- error("You have to define the environnement variable SCUMMVM_PORT");
- return -1;
+ // default alsa port if none specified
+ if (parse_addr("65:0", &seq_client, &seq_port) < 0) {
+ error("Invalid port %s", var);
+ return -1;
+ }
}
-
- if (parse_addr(var, &seq_client, &seq_port) < 0) {
- error("Invalid port %s", var);
- return -1;
+ else {
+ if (parse_addr(var, &seq_client, &seq_port) < 0) {
+ error("Invalid port %s", var);
+ return -1;
+ }
}
if (my_snd_seq_open(&seq_handle)) {
More information about the Scummvm-git-logs
mailing list