From 3b62a1af2a85ca22e02b2f1653f69e766cb75422 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 24 May 2011 16:23:36 +0000 Subject: [PATCH] [WIN32K] - Add a comment about alignment for GreCreateBitmap - Make bits really 32bit aligned - Remove unused variable svn path=/trunk/; revision=51886 --- reactos/subsystems/win32/win32k/ntuser/ntuser.c | 6 +++--- reactos/subsystems/win32/win32k/objects/bitmaps.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/ntuser.c b/reactos/subsystems/win32/win32k/ntuser/ntuser.c index a43287fb065..b28c24ac55a 100644 --- a/reactos/subsystems/win32/win32k/ntuser/ntuser.c +++ b/reactos/subsystems/win32/win32k/ntuser/ntuser.c @@ -92,9 +92,9 @@ UserInitialize( HANDLE hPowerRequestEvent, HANDLE hMediaRequestEvent) { - static const WORD wPattern55AA[] = - { 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0, - 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0 }; + static const DWORD wPattern55AA[] = /* 32 bit aligned */ + { 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa, + 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa }; HBITMAP hPattern55AABitmap = NULL; NTSTATUS Status; diff --git a/reactos/subsystems/win32/win32k/objects/bitmaps.c b/reactos/subsystems/win32/win32k/objects/bitmaps.c index f6264da10bd..1768f6cfb8c 100644 --- a/reactos/subsystems/win32/win32k/objects/bitmaps.c +++ b/reactos/subsystems/win32/win32k/objects/bitmaps.c @@ -80,7 +80,6 @@ GreCreateBitmapEx( IN FLONG flags) { PSURFACE psurf; - SURFOBJ *pso; HBITMAP hbmp; /* Verify format */ @@ -94,9 +93,8 @@ GreCreateBitmapEx( return NULL; } - /* Get the handle for the bitmap and the surfobj */ + /* Get the handle for the bitmap */ hbmp = (HBITMAP)psurf->SurfObj.hsurf; - pso = &psurf->SurfObj; /* The infamous RLE hack */ if (iFormat == BMF_4RLE || iFormat == BMF_8RLE) @@ -144,6 +142,7 @@ GreCreateBitmapEx( /* Creates a DDB surface, * as in CreateCompatibleBitmap or CreateBitmap. + * Note that each scanline must be 32bit aligned! */ HBITMAP APIENTRY