mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[WIN32K]
If pbmiSrc->bmiHeader.bV5ClrUsed is 0, calculate the number of colors from the bit depth. Fixes black taskbar icons with vbox driver on 8 bpp svn path=/branches/reactos-yarotows/; revision=47719
This commit is contained in:
parent
02588ba9c0
commit
26a57a2a9f
1 changed files with 8 additions and 2 deletions
|
@ -1951,15 +1951,21 @@ GetBMIFromBitmapV5Info(IN PBITMAPV5INFO pbmiSrc,
|
|||
else
|
||||
{
|
||||
INT i;
|
||||
ULONG cColorsUsed;
|
||||
|
||||
cColorsUsed = pbmiSrc->bmiHeader.bV5ClrUsed;
|
||||
if (cColorsUsed == 0)
|
||||
cColorsUsed = (1 << pbmiSrc->bmiHeader.bV5BitCount);
|
||||
|
||||
if(dwColorUse == DIB_PAL_COLORS)
|
||||
{
|
||||
RtlCopyMemory(pbmiDst->bmiColors,
|
||||
pbmiSrc->bmiColors,
|
||||
pbmiSrc->bmiHeader.bV5ClrUsed * sizeof(WORD));
|
||||
cColorsUsed * sizeof(WORD));
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i = 0; i < pbmiSrc->bmiHeader.bV5ClrUsed; i++)
|
||||
for(i = 0; i < cColorsUsed; i++)
|
||||
{
|
||||
SetBMIColor(pbmiDst, (DWORD*)pbmiSrc->bmiColors + i, i);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue