Fix messed-up colors in taskbar icons in qemu 16bpp mode. BuildDIBPalette was previously assuming all 16bpp DIBs were 565.

svn path=/trunk/; revision=34117
This commit is contained in:
Jeffrey Morlan 2008-06-26 22:22:57 +00:00
parent 7816c09fea
commit 37f33b89cb

View file

@ -1354,11 +1354,18 @@ BuildDIBPalette (CONST BITMAPINFO *bmi, PINT paletteType)
*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