Huw Davies : gdi: Fix 24bpp -> 32bpp copy.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Dec 8 07:06:23 CST 2005


Module: wine
Branch: refs/heads/master
Commit: e32932e6ab37dd6d6d1993dbea736dc38f0e195f
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=e32932e6ab37dd6d6d1993dbea736dc38f0e195f

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Dec  8 13:53:07 2005 +0100

gdi: Fix 24bpp -> 32bpp copy.

---

 dlls/gdi/dib.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/gdi/dib.c b/dlls/gdi/dib.c
index 6b55d8b..26b8a1a 100644
--- a/dlls/gdi/dib.c
+++ b/dlls/gdi/dib.c
@@ -897,7 +897,9 @@ INT WINAPI GetDIBits(
                             width = min(srcwidth, dstwidth);
                             for( y = 0; y < lines; y++) {
                                 for( x = 0; x < width; x++, srcbits+=3 )
-                                    *dstbits++ = ((DWORD)*srcbits) & 0x00ffffff;
+                                    *dstbits++ =  srcbits[0] |
+                                                 (srcbits[1] <<  8) |
+                                                 (srcbits[2] << 16);
                                 dstbits=(LPDWORD)(dbits+=dstwidthb);
                                 srcbits=(sbits+=srcwidthb);
                             }




More information about the wine-cvs mailing list