From 54b14d414e04e8607f6ce1e30e5bea8c29fd8d41 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 24 May 2011 15:35:30 +0000 Subject: [PATCH] [WIN32K] - Fix the bitmap alignment issue that caused broken scrollbar pattern svn path=/trunk/; revision=51885 --- reactos/subsystems/win32/win32k/ntuser/ntuser.c | 4 +++- reactos/subsystems/win32/win32k/objects/bitmaps.c | 12 ++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/ntuser.c b/reactos/subsystems/win32/win32k/ntuser/ntuser.c index 0a4c70fc549..a43287fb065 100644 --- a/reactos/subsystems/win32/win32k/ntuser/ntuser.c +++ b/reactos/subsystems/win32/win32k/ntuser/ntuser.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/objects/bitmaps.c b/reactos/subsystems/win32/win32k/objects/bitmaps.c index b0d97d2f72c..f6264da10bd 100644 --- a/reactos/subsystems/win32/win32k/objects/bitmaps.c +++ b/reactos/subsystems/win32/win32k/objects/bitmaps.c @@ -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