- Fix the bitmap alignment issue that caused broken scrollbar pattern

svn path=/trunk/; revision=51885
This commit is contained in:
Timo Kreuzer 2011-05-24 15:35:30 +00:00
parent fc94016a41
commit 54b14d414e
2 changed files with 5 additions and 11 deletions

View file

@ -92,7 +92,9 @@ UserInitialize(
HANDLE hPowerRequestEvent,
HANDLE hMediaRequestEvent)
{
static const WORD wPattern55AA[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa };
static const WORD wPattern55AA[] =
{ 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0,
0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0 };
HBITMAP hPattern55AABitmap = NULL;
NTSTATUS Status;

View file

@ -154,23 +154,15 @@ GreCreateBitmap(
IN UINT cBitsPixel,
IN OPTIONAL PVOID pvBits)
{
HBITMAP hbmp;
/* Call the extended function */
hbmp = GreCreateBitmapEx(nWidth,
return GreCreateBitmapEx(nWidth,
nHeight,
0, /* auto width */
BitmapFormat(cBitsPixel * cPlanes, BI_RGB),
0, /* no bitmap flags */
0, /* auto size */
NULL,
pvBits,
DDB_SURFACE /* DDB */);
if (pvBits && hbmp)
{
PSURFACE psurf = SURFACE_ShareLockSurface(hbmp);
UnsafeSetBitmapBits(psurf, 0, pvBits);
SURFACE_ShareUnlockSurface(psurf);
}
return hbmp;
}
HBITMAP