summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2005-02-05 20:31:04 +0000
committerMike Melanson <mike@multimedia.cx>2005-02-05 20:31:04 +0000
commit6fbd5a57426bd7af66b59ccee01e8691a93abbd0 (patch)
treeeb210192cae53939cd2d76b40f8d54a586787e8c /src
parent5c34ff37bb30b68aecf985e77cc06ff8541597e1 (diff)
downloadxine-lib-6fbd5a57426bd7af66b59ccee01e8691a93abbd0.tar.gz
xine-lib-6fbd5a57426bd7af66b59ccee01e8691a93abbd0.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/osd.c21
1 files changed, 9 insertions, 12 deletions
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;