Commit 76560471 authored by Sébastien Toque's avatar Sébastien Toque Committed by Jean-Baptiste Kempf

ProjectM/Milkdrop default presets path on windows using datadir

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a7e51487
...@@ -82,8 +82,12 @@ vlc_module_begin () ...@@ -82,8 +82,12 @@ vlc_module_begin ()
#ifndef HAVE_PROJECTM2 #ifndef HAVE_PROJECTM2
add_file( "projectm-config", "/usr/share/projectM/config.inp", NULL, add_file( "projectm-config", "/usr/share/projectM/config.inp", NULL,
CONFIG_TEXT, CONFIG_LONGTEXT, true ) CONFIG_TEXT, CONFIG_LONGTEXT, true )
#else
#ifdef WIN32
add_directory( "projectm-preset-path", NULL, NULL,
#else #else
add_directory( "projectm-preset-path", "/usr/share/projectM/presets", NULL, add_directory( "projectm-preset-path", "/usr/share/projectM/presets", NULL,
#endif
PRESET_PATH_TXT, PRESET_PATH_LONGTXT, true ) PRESET_PATH_TXT, PRESET_PATH_LONGTXT, true )
add_file( "projectm-title-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", NULL, add_file( "projectm-title-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", NULL,
TITLE_FONT_TXT, TITLE_FONT_LONGTXT, true ) TITLE_FONT_TXT, TITLE_FONT_LONGTXT, true )
...@@ -349,6 +353,14 @@ static void *Thread( void *p_data ) ...@@ -349,6 +353,14 @@ static void *Thread( void *p_data )
free( psz_config ); free( psz_config );
#else #else
psz_preset_path = var_InheritString( p_filter, "projectm-preset-path" ); psz_preset_path = var_InheritString( p_filter, "projectm-preset-path" );
#ifdef WIN32
if ( psz_preset_path == NULL )
{
char *psz_data_path = config_GetDataDir( p_filter );
asprintf( &psz_preset_path, "%s" DIR_SEP "visualisation", psz_data_path );
free( psz_data_path );
}
#endif
psz_title_font = var_InheritString( p_filter, "projectm-title-font" ); psz_title_font = var_InheritString( p_filter, "projectm-title-font" );
psz_menu_font = var_InheritString( p_filter, "projectm-menu-font" ); psz_menu_font = var_InheritString( p_filter, "projectm-menu-font" );
......
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