Commit 50bf597d authored by Felix Paul Kühne's avatar Felix Paul Kühne

darwin/dirs: fix plugin lookup with the NPAPI plugin

parent ee0b9164
...@@ -70,6 +70,10 @@ static char *config_GetLibPath (void) ...@@ -70,6 +70,10 @@ static char *config_GetLibPath (void)
size_t len = strlen(psz_img_name); size_t len = strlen(psz_img_name);
if( len >= 3 && !strcmp( psz_img_name + len - 3, "VLC") ) if( len >= 3 && !strcmp( psz_img_name + len - 3, "VLC") )
return strdup( psz_img_name ); return strdup( psz_img_name );
/* Do we end by "VLC-Plugin"? oh, we must be the NPAPI plugin */
if( len >= 10 && !strcmp( psz_img_name + len - 10, "VLC-Plugin") )
return strdup( psz_img_name );
} }
/* We are not linked to the VLC.framework, let's use dladdr to figure /* We are not linked to the VLC.framework, let's use dladdr to figure
...@@ -82,7 +86,7 @@ static char *config_GetLibPath (void) ...@@ -82,7 +86,7 @@ static char *config_GetLibPath (void)
uint32_t path_len = sizeof(path) - 1; uint32_t path_len = sizeof(path) - 1;
if ( !_NSGetExecutablePath(path, &path_len) ) if ( !_NSGetExecutablePath(path, &path_len) )
return strdup(path); return strdup(path);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment