[ros-diffs] [greatlrd] 23899: 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.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Sep 3 20:16:08 CEST 2006


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/objects/dibobj.c?rev=23899&r1=23898&r2=23899&view=diff
==============================================================================
--- 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);  




More information about the Ros-diffs mailing list