Module: wine Branch: master Commit: 21c3e79e52c54857c7b3a41c96ac58328d70bc16 URL: http://source.winehq.org/git/wine.git/?a=commit;h=21c3e79e52c54857c7b3a41c96...
Author: Eric Pouech eric.pouech@orange.fr Date: Sat Feb 28 14:07:52 2009 +0100
winex11: Correctly pad 1 bpp DDB's lines with 0 values.
---
dlls/gdi32/tests/bitmap.c | 1 - dlls/winex11.drv/dib.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index db3ae6d..b1ba7a0 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -1580,7 +1580,6 @@ static void test_GetDIBits(void) }
/* returned bits are DWORD aligned and upside down */ -todo_wine ok(!memcmp(buf, dib_bits_1, sizeof(dib_bits_1)), "DIB bits don't match\n");
/* Test the palette indices */ diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 4af4336..6df4137 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -618,8 +618,11 @@ static void X11DRV_DIB_GetImageBits_1( int lines, BYTE *dstbits, } } if ((width&7)!=0) { - *dstbyte=dstval; + *dstbyte++=dstval; } + /* pad with 0 to DWORD alignment */ + for (x = (x+7)&~7; x < ((width + 31) & ~31); x+=8) + *dstbyte++ = 0; dstbits += linebytes; } } else {