[vlc-commits] commit: ProjectM/Milkdrop default presets path on windows using datadir ( =?UTF-8?Q?S=C3=A9bastien=20Toque=20?=)

git at videolan.org git at videolan.org
Mon Jan 17 17:31:22 CET 2011


vlc/vlc-1.1 | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Jan  9 21:40:52 2011 +0100| [765604712c4d5516ad8f76a7784b0083dd99d713] | committer: Jean-Baptiste Kempf 

ProjectM/Milkdrop default presets path on windows using datadir

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=765604712c4d5516ad8f76a7784b0083dd99d713
---

 modules/visualization/projectm.cpp |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
index 10b4760..a054519 100644
--- a/modules/visualization/projectm.cpp
+++ b/modules/visualization/projectm.cpp
@@ -83,7 +83,11 @@ vlc_module_begin ()
     add_file( "projectm-config", "/usr/share/projectM/config.inp", NULL,
               CONFIG_TEXT, CONFIG_LONGTEXT, true )
 #else
+#ifdef WIN32
+    add_directory( "projectm-preset-path", NULL, NULL,
+#else
     add_directory( "projectm-preset-path", "/usr/share/projectM/presets", NULL,
+#endif
                    PRESET_PATH_TXT, PRESET_PATH_LONGTXT, true )
     add_file( "projectm-title-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", NULL,
               TITLE_FONT_TXT, TITLE_FONT_LONGTXT, true )
@@ -349,6 +353,14 @@ static void *Thread( void *p_data )
     free( psz_config );
 #else
     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_menu_font = var_InheritString( p_filter, "projectm-menu-font" );
 



More information about the vlc-commits mailing list