From 7fe1969532775d72e129ffd948f8ef4ccbe4c501 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sun, 3 Sep 2006 18:16:08 +0000 Subject: [PATCH] Fixed one more bug, we did create wrong bpp if we got HDC = NULL for CreateDIBitmap, when I read wine code it is always 1Bpp and 1Plans and we are doing same now if HDC is NULL, some wine test deepness on it. Hopply it will take care of some program problem. svn path=/trunk/; revision=23899 --- reactos/subsystems/win32/win32k/objects/dibobj.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/objects/dibobj.c b/reactos/subsystems/win32/win32k/objects/dibobj.c index 00d211811c3..c06aa51b9b4 100644 --- a/reactos/subsystems/win32/win32k/objects/dibobj.c +++ b/reactos/subsystems/win32/win32k/objects/dibobj.c @@ -795,7 +795,8 @@ HBITMAP STDCALL NtGdiCreateDIBitmap(HDC hDc, const BITMAPINFOHEADER *Header, if (NULL == hDc) - { + { + BITMAPINFOHEADER *change_Header = (BITMAPINFOHEADER *)Header; hDc = IntGdiCreateDC(NULL, NULL, NULL, NULL,FALSE); if (hDc == NULL) { @@ -810,6 +811,9 @@ HBITMAP STDCALL NtGdiCreateDIBitmap(HDC hDc, const BITMAPINFOHEADER *Header, return NULL; } + change_Header->biBitCount = 1; + change_Header->biPlanes = 1; + Bmp = IntCreateDIBitmap(Dc, Header, Init, Bits, Data, ColorUse); DC_UnlockDc(Dc); NtGdiDeleteObjectApp(hDc);