Module: wine Branch: master Commit: fa239446951f5fb5b2377e0cd99901c74bd838a5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa239446951f5fb5b2377e0cd9...
Author: Jeremy White jwhite@codeweavers.com Date: Fri Jul 13 15:45:42 2007 -0500
gdi32: Do not fill in the color table if lpvBits is NULL.
---
dlls/gdi32/dib.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 2a98efb..ac6c885 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -972,11 +972,15 @@ INT WINAPI GetDIBits( break;
case 16: + if (bits) + { + /* Add color only when bits is given, as per MSDN */ + ((PDWORD)info->bmiColors)[0] = 0xf800; + ((PDWORD)info->bmiColors)[1] = 0x07e0; + ((PDWORD)info->bmiColors)[2] = 0x001f; + } info->bmiHeader.biBitCount = 16; info->bmiHeader.biCompression = BI_BITFIELDS; - ((PDWORD)info->bmiColors)[0] = 0xf800; - ((PDWORD)info->bmiColors)[1] = 0x07e0; - ((PDWORD)info->bmiColors)[2] = 0x001f; break;
default: