From 8448ac75abdacdc33c55d638e6a2bcaa53f2b02a Mon Sep 17 00:00:00 2001 From: Jean-Yves Lamoureux Date: Tue, 19 Sep 2006 18:40:09 +0000 Subject: [PATCH] * Ugly workaround in OpenGL driver for IA64 platform, unicode still does not work, thought. --- caca/driver_gl.c | 12 ++++++------ cucul/font.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/caca/driver_gl.c b/caca/driver_gl.c index 231c50e..48e1d7c 100644 --- a/caca/driver_gl.c +++ b/caca/driver_gl.c @@ -254,19 +254,19 @@ static void gl_display(caca_display_t *dp) uint16_t fg; int i, b; - for(b = 0, i = 0; dp->drv.p->blocks[i + 1]; i += 2) + for(b = 0, i = 0; (dp->drv.p->blocks[i + 1]); i += 2) { - if(cv < dp->drv.p->blocks[i]) - break; + if(cv < (dp->drv.p->blocks[i]&0xFFFFFFFF)) + break; - if(cv >= dp->drv.p->blocks[i + 1]) + if(cv >= (dp->drv.p->blocks[i + 1])) { - b += dp->drv.p->blocks[i + 1] - dp->drv.p->blocks[i]; + b += (dp->drv.p->blocks[i + 1]) - (dp->drv.p->blocks[i]); continue; } glBindTexture(GL_TEXTURE_2D, - dp->drv.p->txid[b + cv - dp->drv.p->blocks[i]]); + dp->drv.p->txid[b + cv - (dp->drv.p->blocks[i]&0xFFFFFFFF)]); fg = _cucul_argb32_to_rgb12fg(*attr); glColor3b(((fg & 0xf00) >> 8) * 8, diff --git a/cucul/font.c b/cucul/font.c index 139ecdf..b4eb32d 100644 --- a/cucul/font.c +++ b/cucul/font.c @@ -432,9 +432,9 @@ int cucul_render_canvas(cucul_canvas_t *cv, cucul_font_t *f, b = f->header.blocks; break; } - - if(ch < f->block_list[b].stop) + if(ch < f->block_list[b].stop) { break; + } } /* Glyph not in font? Skip it. */