Commit 673dd735 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Don't use the bitfields for the BI_RGB case.

parent b295b536
......@@ -774,7 +774,17 @@ INT WINAPI GetDIBits(
case 16:
if (info->bmiHeader.biCompression == BI_BITFIELDS)
{
if (bmp->dib) memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) );
if (bmp->dib)
{
if (bmp->dib->dsBmih.biCompression == BI_BITFIELDS)
memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) );
else
{
((PDWORD)info->bmiColors)[0] = 0x7c00;
((PDWORD)info->bmiColors)[1] = 0x03e0;
((PDWORD)info->bmiColors)[2] = 0x001f;
}
}
else
{
((PDWORD)info->bmiColors)[0] = 0xf800;
......@@ -788,7 +798,8 @@ INT WINAPI GetDIBits(
case 32:
if (info->bmiHeader.biCompression == BI_BITFIELDS)
{
if (bmp->dib) memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) );
if (bmp->dib && bmp->dib->dsBmih.biCompression == BI_BITFIELDS)
memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) );
else
{
((PDWORD)info->bmiColors)[0] = 0xff0000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment