From 7196cddb3a404292858101f9cd1a5061e422d2c1 Mon Sep 17 00:00:00 2001 From: Sean D'Epagnier Date: Thu, 10 Aug 2006 10:21:17 +0000 Subject: Added initial multisampling support to glfbdev driver. Fully implemented glutGameMode, and added vidresize stubs to make Added support for glutReshapeDisplay to change video mode but not lose current mesa context. implementation glut 5 complient. Fixed many minor bugs Updated docs --- src/glut/fbdev/cursor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/glut/fbdev/cursor.c') diff --git a/src/glut/fbdev/cursor.c b/src/glut/fbdev/cursor.c index b753a5c9ff..06ae2d6f54 100644 --- a/src/glut/fbdev/cursor.c +++ b/src/glut/fbdev/cursor.c @@ -44,7 +44,7 @@ static unsigned char *MouseBuffer; void InitializeCursor(void) { - if((MouseBuffer = malloc(CURSOR_WIDTH * CURSOR_HEIGHT + if(!MouseBuffer && (MouseBuffer = malloc(CURSOR_WIDTH * CURSOR_HEIGHT * VarInfo.bits_per_pixel / 8)) == NULL) { sprintf(exiterror, "malloc failure\n"); exit(0); @@ -216,10 +216,10 @@ void SwapCursor(void) if(miny < 0) miny = 0; - if(minx + sizex > VarInfo.xres) - sizex = VarInfo.xres - minx; - if(miny + sizey > VarInfo.yres) - sizey = VarInfo.yres - miny; + if(minx + sizex > VarInfo.xres - CURSOR_WIDTH) + sizex = VarInfo.xres - CURSOR_WIDTH - minx; + if(miny + sizey > VarInfo.yres - CURSOR_HEIGHT) + sizey = VarInfo.yres - CURSOR_HEIGHT - miny; off = FixedInfo.line_length * miny + minx * VarInfo.bits_per_pixel / 8; stride = (sizex + CURSOR_WIDTH) * VarInfo.bits_per_pixel / 8; -- cgit v1.2.3