X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fdarwin_specific.c;h=810bd1b27ae175a7935d64dddd90eff13edf6154;hb=e339d116d18123afcd30e3c7f6ec176c84d160e7;hp=1f74cafb3a3ccc3d1ba5a583f32ebd79f3128465;hpb=c035e8417b7d1ff3df7d95af3a7e34092912db96;p=vlc diff --git a/src/misc/darwin_specific.c b/src/misc/darwin_specific.c index 1f74cafb3a..810bd1b27a 100644 --- a/src/misc/darwin_specific.c +++ b/src/misc/darwin_specific.c @@ -1,3 +1,4 @@ + /***************************************************************************** * darwin_specific.m: Darwin specific features ***************************************************************************** @@ -69,7 +70,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] ) p_char += 26; /* p_char += strlen(" VLCKit.framework/Versions/" ) */ while( *p_char != '\0' && *p_char != '/') p_char++; - + /* If the string ends with VLC then we've found a winner */ if ( !strcmp( p_char, "/VLCKit" ) ) { @@ -79,6 +80,17 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] ) else p_char = NULL; } + else + { + size_t len = strlen(psz_img_name); + /* Do we end by "VLC"? If so we are the legacy VLC.app that doesn't + * link to VLCKit. */ + if( !strcmp( psz_img_name + len - 3, "VLC") ) + { + p_char = strdup( psz_img_name ); + break; + } + } } if ( !p_char ) { @@ -150,10 +162,11 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] ) /***************************************************************************** * system_Configure: check for system specific configuration options. *****************************************************************************/ -void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] ) +void system_Configure( libvlc_int_t *p_this, + int i_argc, const char *const ppsz_argv[] ) { (void)p_this; - (void)pi_argc; + (void)i_argc; (void)ppsz_argv; }