[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 3 May 2012 14:39:53 +0000 (14:39 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 3 May 2012 14:39:53 +0000 (14:39 +0000)
Only set the surface's bitmap bits when iType == STYPE_BITMAP.
Fixes booting with vbox drivers installed.

svn path=/trunk/; revision=56482

reactos/win32ss/gdi/eng/surface.c

index 2fb1c03..4882cb9 100644 (file)
@@ -257,25 +257,26 @@ SURFACE_AllocSurface(
                 RtlZeroMemory(pso->pvBits, cjBits);
             }
         }
-    }
-    else
-    {
-        /* There are no bitmap bits */
-        pso->pvBits = NULL;
-    }
 
-    /* Set pvScan0 and lDelta */
-    if (fjBitmap & BMF_TOPDOWN)
-    {
-        /* Topdown is the normal way */
-        pso->pvScan0 = pso->pvBits;
-        pso->lDelta = cjWidth;
+        /* Set pvScan0 and lDelta */
+        if (fjBitmap & BMF_TOPDOWN)
+        {
+            /* Topdown is the normal way */
+            pso->pvScan0 = pso->pvBits;
+            pso->lDelta = cjWidth;
+        }
+        else
+        {
+            /* Inversed bitmap (bottom up) */
+            pso->pvScan0 = ((PCHAR)pso->pvBits + pso->cjBits - cjWidth);
+            pso->lDelta = -(LONG)cjWidth;
+        }
     }
     else
     {
-        /* Inversed bitmap (bottom up) */
-        pso->pvScan0 = ((PCHAR)pso->pvBits + pso->cjBits - cjWidth);
-        pso->lDelta = -(LONG)cjWidth;
+        /* There are no bitmap bits */
+        pso->pvScan0 = pso->pvBits = NULL;
+        pso->lDelta = 0;
     }
 
     /* Assign a default palette and increment its reference count */
@@ -373,6 +374,8 @@ EngCreateDeviceSurface(
     PSURFACE psurf;
     HSURF hsurf;
 
+__debugbreak();
+
     /* Allocate a surface */
     psurf = SURFACE_AllocSurface(STYPE_DEVICE,
                                  sizl.cx,