Commit in reactos/subsys/win32k/objects on MAIN
bitmaps.c+7-91.59 -> 1.60
- Fixed the Andrew's NtGdiCreateCompatibleBitmap fix, it was using a wrong Bits array.

reactos/subsys/win32k/objects
bitmaps.c 1.59 -> 1.60
diff -u -r1.59 -r1.60
--- bitmaps.c	10 Mar 2004 15:22:43 -0000	1.59
+++ bitmaps.c	10 Mar 2004 16:55:03 -0000	1.60
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: bitmaps.c,v 1.59 2004/03/10 15:22:43 silverblade Exp $ */
+/* $Id: bitmaps.c,v 1.60 2004/03/10 16:55:03 navaraf Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -268,7 +268,6 @@
 {
   PBITMAPOBJ  bmp;
   HBITMAP  hBitmap;
-  int Pixel;
 
   Planes = (BYTE) Planes;
   BitsPerPel = (BYTE) BitsPerPel;
@@ -323,16 +322,15 @@
 
   BITMAPOBJ_UnlockBitmap( hBitmap );
   
-  // Initialize the bitmap (fixes bug 244?)
-  for (Pixel = 0; Pixel < Height * bmp->bitmap.bmWidthBytes; Pixel ++)
-  {
-    ((char*)Bits)[Pixel] = 0;
-  }
-
   if (Bits) /* Set bitmap bits */
-  {
+  {   
     NtGdiSetBitmapBits(hBitmap, Height * bmp->bitmap.bmWidthBytes, Bits);
   }
+  else
+  {
+    // Initialize the bitmap (fixes bug 244?)
+    RtlZeroMemory(bmp->bitmap.bmBits, Height * bmp->bitmap.bmWidthBytes);
+  }
 
   return  hBitmap;
 }
CVSspam 0.2.8