Commit 278b0b2a authored by Antoine Cellerier's avatar Antoine Cellerier

* Fix non linux compilation round 2.

parent 68e40a4e
...@@ -110,6 +110,10 @@ VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) ); ...@@ -110,6 +110,10 @@ VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) ); VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
VLC_EXPORT( libvlc_int_t *, vlc_current_object, ( int ) ); VLC_EXPORT( libvlc_int_t *, vlc_current_object, ( int ) );
#if defined( WIN32 ) || defined( SYS_BEOS ) || defined( __APPLE__ )
VLC_EXPORT( const char *, vlc_path, ( vlc_object_t * ) );
#endif
/*}@*/ /*}@*/
#define vlc_object_create(a,b) \ #define vlc_object_create(a,b) \
......
...@@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this )
#if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32) #if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL ) if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL )
{ {
char * psz_vlcpath = p_intf->p_libvlc_global->psz_vlcpath; char * psz_vlcpath = vlc_path( p_intf );
psz_src = malloc( strlen(psz_vlcpath) + strlen("/share/http" ) + 1 ); psz_src = malloc( strlen(psz_vlcpath) + strlen("/share/http" ) + 1 );
if( !psz_src ) return VLC_ENOMEM; if( !psz_src ) return VLC_ENOMEM;
#if defined(WIN32) #if defined(WIN32)
......
...@@ -296,7 +296,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this ) ...@@ -296,7 +296,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32) # if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{ {
char *psz_vlcpath = p_demux->p_libvlc_global->psz_vlcpath; char *psz_vlcpath = vlc_path( p_demux );
ppsz_dir_list[1] = malloc( strlen( psz_vlcpath ) + strlen( "/share/luaplaylist" ) + 1 ); ppsz_dir_list[1] = malloc( strlen( psz_vlcpath ) + strlen( "/share/luaplaylist" ) + 1 );
if( !ppsz_dir_list[1] ) return VLC_ENOMEM; if( !ppsz_dir_list[1] ) return VLC_ENOMEM;
# if defined( WIN32 ) # if defined( WIN32 )
......
...@@ -227,13 +227,13 @@ bool Win32Factory::init() ...@@ -227,13 +227,13 @@ bool Win32Factory::init()
// Initialize the resource path // Initialize the resource path
m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir + m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir +
"\\" + CONFIG_DIR + "\\skins" ); "\\" + CONFIG_DIR + "\\skins" );
m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\skins" ); "\\skins" );
m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\skins2" ); "\\skins2" );
m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\share\\skins" ); "\\share\\skins" );
m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + m_resourcePath.push_back( (string)vlc_path( getIntf() ) +
"\\share\\skins2" ); "\\share\\skins2" );
// All went well // All went well
......
...@@ -1370,3 +1370,11 @@ static void ListChildren( vlc_list_t *p_list, vlc_object_t *p_this, int i_type ) ...@@ -1370,3 +1370,11 @@ static void ListChildren( vlc_list_t *p_list, vlc_object_t *p_this, int i_type )
} }
} }
} }
#if defined( WIN32 ) || defined( SYS_BEOS ) || defined( __APPLE__ )
const char *vlc_path( vlc_object_t *p_this )
{
return vlc_global( p_this )->psz_vlcpath;
}
#endif
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