summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2001-12-17 00:09:33 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2001-12-17 00:09:33 +0000
commit02c4b792ae907d6107d9540b8c30f2571bd4104d (patch)
tree0c23839e2637e577049f45f2cc252cc5ed4d49e3 /src
parent74fa7e2f468f30accdb020a434899fb10f302457 (diff)
downloadxine-lib-02c4b792ae907d6107d9540b8c30f2571bd4104d.tar.gz
xine-lib-02c4b792ae907d6107d9540b8c30f2571bd4104d.tar.bz2
small fixes for chars > 127
CVS patchset: 1262 CVS date: 2001/12/17 00:09:33
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/osd.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index 59a4a2e25..e03489280 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -615,6 +615,7 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, char *text) {
osd_font_t *font;
int i, y;
uint8_t *dst, *src;
+ int c;
#ifdef LOG_DEBUG
printf("osd_render_text %p (%d,%d) \"%s\"\n", osd, x1, y1, text);
@@ -628,14 +629,15 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, char *text) {
if( y1 < osd->y1 ) osd->y1 = y1;
while( font && *text ) {
-
+ c = *text & 0xff;
+
for( i = 0; i < font->num_fontchars; i++ ) {
- if( font->fontchar[i].code == (*text & 0xff) )
+ if( font->fontchar[i].code == c )
break;
}
#ifdef LOG_DEBUG
- printf("font %s [%d] %dx%d -> %d,%d\n",font->name, *text,
+ printf("font %s [%c:%d] %dx%d -> %d,%d\n",font->name, c, font->fontchar[i].code,
font->fontchar[i].width, font->fontchar[i].height,
x1,y1);
#endif
@@ -670,7 +672,7 @@ static int osd_get_text_size(osd_object_t *osd, char *text, int *width, int *hei
osd_renderer_t *this = osd->renderer;
osd_font_t *font;
- int i;
+ int i, c;
#ifdef LOG_DEBUG
printf("osd_get_text_size %p \"%s\"\n", osd, text);
@@ -684,9 +686,10 @@ static int osd_get_text_size(osd_object_t *osd, char *text, int *width, int *hei
*height = 0;
while( font && *text ) {
-
+ c = *text & 0xff;
+
for( i = 0; i < font->num_fontchars; i++ ) {
- if( font->fontchar[i].code == *text )
+ if( font->fontchar[i].code == c )
break;
}