Author: greatlrd
Date: Sun Sep 3 22:16:08 2006
New Revision: 23899
URL:
http://svn.reactos.org/svn/reactos?rev=23899&view=rev
Log:
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.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c Sun Sep 3 22:16:08 2006
@@ -795,7 +795,8 @@
if (NULL == hDc)
- {
+ {
+ BITMAPINFOHEADER *change_Header = (BITMAPINFOHEADER *)Header;
hDc = IntGdiCreateDC(NULL, NULL, NULL, NULL,FALSE);
if (hDc == NULL)
{
@@ -810,6 +811,9 @@
return NULL;
}
+ change_Header->biBitCount = 1;
+ change_Header->biPlanes = 1;
+
Bmp = IntCreateDIBitmap(Dc, Header, Init, Bits, Data, ColorUse);
DC_UnlockDc(Dc);
NtGdiDeleteObjectApp(hDc);