diff mplayer.c @ 7201:22beff6edf75

Improved MacOS X SDL support, enable SDL main() wrapper for Darwin, remove unused envp. Patch by Donnie Smith <xc0bead2d8130df59@f4n.org>, updated by me.
author atmos4
date Sat, 31 Aug 2002 15:04:18 +0000
parents 1eadce15446c
children b414c2e34b2e
line wrap: on
line diff
--- a/mplayer.c	Sat Aug 31 14:54:00 2002 +0000
+++ b/mplayer.c	Sat Aug 31 15:04:18 2002 +0000
@@ -469,7 +469,17 @@
   return eof;
 }
 
-int main(int argc,char* argv[], char *envp[]){
+/*
+ * In Mac OS X the SDL-lib is built upon Cocoa. The easiest way to
+ * make it all work is to use the builtin SDL-bootstrap code, which 
+ * will be done automatically by replacing our main() if we include SDL.h.
+ */
+#if defined(SYS_DARWIN) && defined(HAVE_SDL)
+#include <SDL.h>
+#endif
+
+int main(int argc,char* argv[]){
+
 
 
 static demux_stream_t *d_audio=NULL;
@@ -564,7 +574,7 @@
     if ( use_gui ) cfg_read();
 #endif
 
-    if(m_config_parse_command_line(mconfig, argc, argv, envp) < 0) exit(1); // error parsing cmdline
+    if(m_config_parse_command_line(mconfig, argc, argv) < 0) exit(1); // error parsing cmdline
 
     playtree = play_tree_cleanup(playtree);
     if(playtree) {