mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
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:
parent
7816c09fea
commit
37f33b89cb
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue