[Scummvm-cvs-logs] CVS: scummvm/sound gmidi.cpp,1.6,1.7

James Brown ender at users.sourceforge.net
Thu Mar 14 04:15:05 CET 2002


Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv12776/sound

Modified Files:
	gmidi.cpp 
Log Message:
Fix some possible problems with new gmidi.cpp compiling on Mac Carbon..



Index: gmidi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/gmidi.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** gmidi.cpp	14 Mar 2002 08:04:21 -0000	1.6
--- gmidi.cpp	14 Mar 2002 12:14:22 -0000	1.7
***************
*** 113,117 ****
  
  int MidiDriver::open_sequencer_device() {
! 	int device;
  	char *device_name = getenv("SCUMMVM_MIDI");
  	if (device_name != NULL) {
--- 113,118 ----
  
  int MidiDriver::open_sequencer_device() {
! 	int device = 0;
! #if !define(__APPLE__CW)		// No getenv support on Apple Carbon
  	char *device_name = getenv("SCUMMVM_MIDI");
  	if (device_name != NULL) {
***************
*** 129,132 ****
--- 130,134 ----
  			error("Cannot open /dev/null to dump midi output");
  	}
+ #endif
  	return device;
  }
***************
*** 134,140 ****
  /*********** Timidity		*/
  int MidiDriver::connect_to_timidity(int port) {
  	struct hostent *serverhost;
! 	struct sockaddr_in sadd;
! 	int s;
  
  	serverhost = gethostbyname("localhost");
--- 136,143 ----
  /*********** Timidity		*/
  int MidiDriver::connect_to_timidity(int port) {
+ 	int s = 0;
+ #if !define(__APPLE__CW)		// No socket support on Apple Carbon
  	struct hostent *serverhost;
! 	struct sockaddr_in sadd;	
  
  	serverhost = gethostbyname("localhost");
***************
*** 151,156 ****
  
  	if (connect(s, (struct sockaddr *) &sadd, sizeof(struct sockaddr_in)) < 0)
! 		error("Could not connect to Timidity server");
! 
  	return s;
  }
--- 154,159 ----
  
  	if (connect(s, (struct sockaddr *) &sadd, sizeof(struct sockaddr_in)) < 0)
! 		error("Could not connect to Timidity server");	
! #endif
  	return s;
  }





More information about the Scummvm-git-logs mailing list