diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-31 15:04:18 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-31 15:04:18 +0000 |
commit | a63ea1a018ca781936dc0d4663b249676382844f (patch) | |
tree | fc476b9b3221705be7aad9d935edec29c2b0b0b6 /mplayer.c | |
parent | dc1ccbc50e06a6f87381c6a08bf6f2f79d5eeb25 (diff) | |
download | mpv-a63ea1a018ca781936dc0d4663b249676382844f.tar.bz2 mpv-a63ea1a018ca781936dc0d4663b249676382844f.tar.xz |
Improved MacOS X SDL support, enable SDL main() wrapper for Darwin, remove unused envp.
Patch by Donnie Smith <xc0bead2d8130df59@f4n.org>, updated by me.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7202 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -469,7 +469,17 @@ static int libmpdemux_was_interrupted(int eof) { 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 @@ int gui_no_filename=0; 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) { |