]> git.sesse.net Git - vlc/commitdiff
darwin_specific: Make sure developer version of VLC.app works.
authorPierre d'Herbemont <pdherbemont@free.fr>
Sun, 24 Jan 2010 16:56:39 +0000 (17:56 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sun, 24 Jan 2010 16:57:15 +0000 (17:57 +0100)
src/misc/darwin_specific.c

index 1f74cafb3a3ccc3d1ba5a583f32ebd79f3128465..91e1a05469119b446530e8f3dd6eccd4557e5958 100644 (file)
@@ -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 )
     {