Only set the surface's bitmap bits when iType == STYPE_BITMAP.
Fixes booting with vbox drivers installed.

svn path=/trunk/; revision=56482
This commit is contained in:
Timo Kreuzer 2012-05-03 14:39:53 +00:00
parent 03c5fb1d08
commit f0ba219f34

View file

@ -257,12 +257,6 @@ SURFACE_AllocSurface(
RtlZeroMemory(pso->pvBits, cjBits); RtlZeroMemory(pso->pvBits, cjBits);
} }
} }
}
else
{
/* There are no bitmap bits */
pso->pvBits = NULL;
}
/* Set pvScan0 and lDelta */ /* Set pvScan0 and lDelta */
if (fjBitmap & BMF_TOPDOWN) if (fjBitmap & BMF_TOPDOWN)
@ -277,6 +271,13 @@ SURFACE_AllocSurface(
pso->pvScan0 = ((PCHAR)pso->pvBits + pso->cjBits - cjWidth); pso->pvScan0 = ((PCHAR)pso->pvBits + pso->cjBits - cjWidth);
pso->lDelta = -(LONG)cjWidth; pso->lDelta = -(LONG)cjWidth;
} }
}
else
{
/* There are no bitmap bits */
pso->pvScan0 = pso->pvBits = NULL;
pso->lDelta = 0;
}
/* Assign a default palette and increment its reference count */ /* Assign a default palette and increment its reference count */
psurf->ppal = appalSurfaceDefault[iFormat]; psurf->ppal = appalSurfaceDefault[iFormat];
@ -373,6 +374,8 @@ EngCreateDeviceSurface(
PSURFACE psurf; PSURFACE psurf;
HSURF hsurf; HSURF hsurf;
__debugbreak();
/* Allocate a surface */ /* Allocate a surface */
psurf = SURFACE_AllocSurface(STYPE_DEVICE, psurf = SURFACE_AllocSurface(STYPE_DEVICE,
sizl.cx, sizl.cx,