Author: tkreuzer Date: Thu May 3 14:39:53 2012 New Revision: 56482
URL: http://svn.reactos.org/svn/reactos?rev=56482&view=rev Log: [WIN32K] Only set the surface's bitmap bits when iType == STYPE_BITMAP. Fixes booting with vbox drivers installed.
Modified: trunk/reactos/win32ss/gdi/eng/surface.c
Modified: trunk/reactos/win32ss/gdi/eng/surface.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/surface.c?r... ============================================================================== --- trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] Thu May 3 14:39:53 2012 @@ -257,25 +257,26 @@ RtlZeroMemory(pso->pvBits, cjBits); } } + + /* 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 { /* 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; - } - else - { - /* Inversed bitmap (bottom up) */ - pso->pvScan0 = ((PCHAR)pso->pvBits + pso->cjBits - cjWidth); - pso->lDelta = -(LONG)cjWidth; + pso->pvScan0 = pso->pvBits = NULL; + pso->lDelta = 0; }
/* Assign a default palette and increment its reference count */ @@ -373,6 +374,8 @@ PSURFACE psurf; HSURF hsurf;
+__debugbreak(); + /* Allocate a surface */ psurf = SURFACE_AllocSurface(STYPE_DEVICE, sizl.cx,