]> git.sesse.net Git - vlc/blobdiff - src/misc/darwin_specific.c
ML: No need to initialise
[vlc] / src / misc / darwin_specific.c
index 1f74cafb3a3ccc3d1ba5a583f32ebd79f3128465..810bd1b27ae175a7935d64dddd90eff13edf6154 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,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;
 }