]> git.sesse.net Git - vlc/commitdiff
freetype: don't create/show fontcache dialog if config is upto date
authorIlkka Ollakka <ileoo@videolan.org>
Wed, 31 Mar 2010 14:46:50 +0000 (17:46 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Thu, 1 Apr 2010 11:29:22 +0000 (14:29 +0300)
This is still blind fix, don't have windows box to test atm. So don't blame
me when it eats your cat and runs to riviera with your money and gf (and free
to revert in those cases). Don't remember if that check works correctly in
windows side.

modules/misc/freetype.c

index 278e7b4087995789f7ccb7f25d02a2b0c6501495..6ac45345d55e9f0ebabea3ae93849f29fe90efb3 100644 (file)
@@ -352,10 +352,15 @@ static int Create( vlc_object_t *p_this )
         goto error;
 
 #ifdef WIN32
-    dialog_progress_bar_t *p_dialog = dialog_ProgressCreate( p_filter,
+    dialog_progress_bar_t *p_dialog = NULL;
+
+    if( !FcConfigUptoDate( NULL ) )
+    {
+        p_dialog = dialog_ProgressCreate( p_filter,
             _("Building font cache"),
             _("Please wait while your font cache is rebuilt.\n"
                 "This should take less than a few minutes."), NULL );
+    }
     char *path = xmalloc( PATH_MAX + 1 );
     /* Fontconfig doesnt seem to know where windows fonts are with
      * current contribs. So just tell default windows font directory