Commit 12f5df71 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Contrib: store fontconfig cache in %appdata%/vlc

And not %appdata% on win32
parent b8aa5b46
diff -ruN fontconfig/src/fcinit.c fontconfig.good/src/fcinit.c
--- fontconfig/src/fcinit.c 2009-06-06 00:59:27.000000000 +0200
+++ fontconfig.good/src/fcinit.c 2009-07-07 01:33:48.000000000 +0200
@@ -24,6 +24,7 @@
#include "fcint.h"
#include <stdlib.h>
+# include <shlobj.h>
static FcConfig *
FcInitFallbackConfig (void)
@@ -35,7 +36,9 @@
goto bail0;
if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
goto bail1;
- if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR))
+ char dir[MAX_PATH];
+ SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, dir );
+ if (!FcConfigAddCacheDir (config, (FcChar8 *)dir))
goto bail1;
return config;
diff -ruN fontconfig/src/fcint.h fontconfig.good/src/fcint.h
--- fontconfig/src/fcint.h 2009-06-24 19:52:13.000000000 +0200
+++ fontconfig.good/src/fcint.h 2009-07-03 00:13:56.000000000 +0200
......@@ -52,3 +30,25 @@ diff -ruN fontconfig/src/fcint.h fontconfig.good/src/fcint.h
$(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
uninstall-libtool-import-lib:
--- fontconfig/src/fcinit.c 2009-06-06 00:59:27.000000000 +0200
+++ fontconfig.good/src/fcinit.c 2009-07-13 14:58:37.000000000 +0200
@@ -24,6 +24,7 @@
#include "fcint.h"
#include <stdlib.h>
+# include <shlobj.h>
static FcConfig *
FcInitFallbackConfig (void)
@@ -35,7 +36,10 @@
goto bail0;
if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
goto bail1;
- if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR))
+ char dir[MAX_PATH+5];
+ SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, dir );
+ strncat( dir, "\\vlc", 4 );
+ if (!FcConfigAddCacheDir (config, (FcChar8 *)dir))
goto bail1;
return config;
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