From 7e4152f0ed46f644a4247444e18dc7ad6c9832b0 Mon Sep 17 00:00:00 2001 From: Sean D'Epagnier Date: Fri, 18 Aug 2006 10:38:15 +0000 Subject: The driver now compiles correctly without any x headers or libraries installed The bitmap and stroke code can't be shared with glx anymore because of this. The model for the mini teapot is restored and I have tested it to work with linux-fbdev and linux-solo The driver recognizes 32bpp where there is no alpha (my radeon 7500) It also sets the correct number of cmap entrees (instead of 256 which can be an error) --- src/glut/fbdev/cursor.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/glut/fbdev/cursor.c') diff --git a/src/glut/fbdev/cursor.c b/src/glut/fbdev/cursor.c index 06ae2d6f54..e7fb00f46f 100644 --- a/src/glut/fbdev/cursor.c +++ b/src/glut/fbdev/cursor.c @@ -163,7 +163,8 @@ void DrawCursor(void) cstride /= 2; for(i = yoff; i < ylen; i++) { for(j = xoff; j < xlen; j++) { - e[0] = ((((d[0] + (((int)(((e[0] >> 8) & 0xf8) + if(d[3] < 220) + e[0] = ((((d[0] + (((int)(((e[0] >> 8) & 0xf8) | ((c[0] >> 11) & 0x7)) * d[3]) >> 8)) & 0xf8) << 8) | (((d[1] + (((int)(((e[0] >> 3) & 0xfc) | ((e[0] >> 5) & 0x3)) * d[3]) >> 8)) & 0xfc) << 3) @@ -181,9 +182,11 @@ void DrawCursor(void) case 4: for(i = yoff; i < ylen; i++) { for(j = xoff; j < xlen; j++) { - c[0] = d[0] + (((int)c[0] * d[3]) >> 8); - c[1] = d[1] + (((int)c[1] * d[3]) >> 8); - c[2] = d[2] + (((int)c[2] * d[3]) >> 8); + if(d[3] < 220) { + c[0] = d[0] + (((int)c[0] * d[3]) >> 8); + c[1] = d[1] + (((int)c[1] * d[3]) >> 8); + c[2] = d[2] + (((int)c[2] * d[3]) >> 8); + } c+=bypp; d+=4; -- cgit v1.2.3