From 0449937a84a21e8cef4a5dd0bcdbac6d7b7fd4c8 Mon Sep 17 00:00:00 2001 From: Marco Pietrobono Date: Thu, 28 Mar 2002 22:05:57 +0000 Subject: [PATCH] Added support for 16bit mouse cursor bitmaps in RGB 565 format. --- dlls/x11drv/mouse.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/dlls/x11drv/mouse.c b/dlls/x11drv/mouse.c index dc72cc9dae2..b4db4b2dff9 100644 --- a/dlls/x11drv/mouse.c +++ b/dlls/x11drv/mouse.c @@ -215,6 +215,12 @@ Cursor X11DRV_GetCursor( Display *display, CURSORICONINFO *ptr ) bbits = 8; threshold = 0x40; break; + case 16: + rbits = 5; + gbits = 6; + bbits = 5; + threshold = 0x40; + break; default: FIXME("Currently no support for cursors with %d bits per pixel\n", ptr->bBitsPerPixel); @@ -248,13 +254,27 @@ Cursor X11DRV_GetCursor( Display *display, CURSORICONINFO *ptr ) { for (x=0; xbBitsPerPixel) + { + case 24: + theChar = theImage[byteIndex++]; + blue = theChar; + theChar = theImage[byteIndex++]; + green = theChar; + theChar = theImage[byteIndex++]; + red = theChar; + break; + case 16: + theChar = theImage[byteIndex++]; + blue = theChar & 0x1F; + green = (theChar & 0xE0) >> 5; + theChar = theImage[byteIndex++]; + green |= (theChar & 0x07) << 3; + red = (theChar & 0xF8) >> 3; + break; + } + if (red+green+blue > threshold) { rfg += red;