From 6fbd5a57426bd7af66b59ccee01e8691a93abbd0 Mon Sep 17 00:00:00 2001 From: Mike Melanson Date: Sat, 5 Feb 2005 20:31:04 +0000 Subject: legacy compiler patch (keep those variable decls at the front of a function), courtesy of Diego Biurrun CVS patchset: 7383 CVS date: 2005/02/05 20:31:04 --- src/xine-engine/osd.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index f35567c42..aec55cd14 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -996,6 +996,8 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, #ifdef HAVE_FT2 FT_UInt previous = 0; + FT_Bool use_kerning = osd->ft2 && osd->ft2->useme && FT_HAS_KERNING(osd->ft2->face); + int first = 1; #endif lprintf("osd=%p (%d,%d) \"%s\"\n", osd, x1, y1, text); @@ -1023,11 +1025,6 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, } } -#ifdef HAVE_FT2 - FT_Bool use_kerning = osd->ft2 && osd->ft2->useme && FT_HAS_KERNING(osd->ft2->face); - int first = 1; -#endif - if( x1 < osd->x1 ) osd->x1 = x1; if( y1 < osd->y1 ) osd->y1 = y1; @@ -1170,6 +1167,13 @@ static int osd_get_text_size(osd_object_t *osd, const char *text, int *width, in uint16_t unicode; size_t inbytesleft; +#ifdef HAVE_FT2 + /* not all free type fonts provide kerning */ + FT_Bool use_kerning = osd->ft2 && osd->ft2->useme && FT_HAS_KERNING(osd->ft2->face); + FT_UInt previous = 0; + int first_glyph = 1; +#endif + lprintf("osd=%p \"%s\"\n", osd, text); pthread_mutex_lock (&this->osd_mutex); @@ -1189,13 +1193,6 @@ static int osd_get_text_size(osd_object_t *osd, const char *text, int *width, in } } -#ifdef HAVE_FT2 - /* not all free type fonts provide kerning */ - FT_Bool use_kerning = osd->ft2 && osd->ft2->useme && FT_HAS_KERNING(osd->ft2->face); - FT_UInt previous = 0; - int first_glyph = 1; -#endif - *width = 0; *height = 0; -- cgit v1.2.3