Author: jmorlan
Date: Thu Jun 26 17:22:57 2008
New Revision: 34117
URL:
http://svn.reactos.org/svn/reactos?rev=34117&view=rev
Log:
Fix messed-up colors in taskbar icons in qemu 16bpp mode. BuildDIBPalette was previously
assuming all 16bpp DIBs were 565.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Thu Jun 26
17:22:57 2008
@@ -1354,11 +1354,18 @@
*paletteType = PAL_INDEXED;
RedMask = GreenMask = BlueMask = 0;
}
+ else if(bmi->bmiHeader.biCompression == BI_BITFIELDS)
+ {
+ *paletteType = PAL_BITFIELDS;
+ RedMask = ((ULONG *)bmi->bmiColors)[0];
+ GreenMask = ((ULONG *)bmi->bmiColors)[1];
+ BlueMask = ((ULONG *)bmi->bmiColors)[2];
+ }
else if(bits < 24)
{
*paletteType = PAL_BITFIELDS;
- RedMask = 0xf800;
- GreenMask = 0x07e0;
+ RedMask = 0x7c00;
+ GreenMask = 0x03e0;
BlueMask = 0x001f;
}
else