From 684138de611d8830e7253b37c9acb5f3820173fc Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Sun, 24 Jan 2010 17:56:39 +0100 Subject: [PATCH] darwin_specific: Make sure developer version of VLC.app works. --- src/misc/darwin_specific.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/misc/darwin_specific.c b/src/misc/darwin_specific.c index 1f74cafb3a..91e1a05469 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,16 @@ 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 ) { -- 2.39.5