From a89c7dcf3dd5cf7ed99d3d2e7b60e30671161d82 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 9 Jun 2005 17:58:33 +0000 Subject: [PATCH] fix a bug in hline for 16bpp it did not do Align to fullword boundary correct GvG did spot this lite bug. fix fill bug in 8bpp now it will boot agein thx waxdragon that did spot this problem. svn path=/trunk/; revision=15845 --- reactos/subsys/win32k/dib/dib16bpp.c | 4 ++-- reactos/subsys/win32k/dib/dib8bpp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/win32k/dib/dib16bpp.c b/reactos/subsys/win32k/dib/dib16bpp.c index 0f4f901dfbd..66d310de60b 100644 --- a/reactos/subsys/win32k/dib/dib16bpp.c +++ b/reactos/subsys/win32k/dib/dib16bpp.c @@ -49,11 +49,11 @@ DIB_16BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c) __asm__( " cld\n" -" andl $0xffff, %0\n" /* If the pixel value is "abcd", put "abcdabcd" in %eax */ " mov %0, %%eax\n" " shl $16, %%eax\n" +" andl $0xffff, %0\n" /* If the pixel value is "abcd", put "abcdabcd" in %eax */ " or %0, %%eax\n" -" test $0x01, %%edi\n" /* Align to fullword boundary */ +" test $0x03, %%edi\n" /* Align to fullword boundary */ " jz .L1\n" " stosw\n" " dec %1\n" diff --git a/reactos/subsys/win32k/dib/dib8bpp.c b/reactos/subsys/win32k/dib/dib8bpp.c index d1fb1db2563..93e1e885262 100644 --- a/reactos/subsys/win32k/dib/dib8bpp.c +++ b/reactos/subsys/win32k/dib/dib8bpp.c @@ -352,7 +352,7 @@ DIB_8BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color) ULONG DestY; for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++) { - DIB_32BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color); + DIB_8BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color); } return TRUE;