Peter Beutner : ddraw: Fix transparent Blits on 8bit surfaces.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 27 09:33:12 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 07fe82dd55cf03aa7c0e9ad421d756d48ca8cd71
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=07fe82dd55cf03aa7c0e9ad421d756d48ca8cd71
Author: Peter Beutner <p.beutner at gmx.net>
Date: Sat Feb 25 13:34:52 2006 +0100
ddraw: Fix transparent Blits on 8bit surfaces.
There are no red/green/blue bitmasks with color depth==8bpp. In that
case always match against the whole byte.
---
dlls/ddraw/surface_dib.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/ddraw/surface_dib.c b/dlls/ddraw/surface_dib.c
index f7b8073..55bdf20 100644
--- a/dlls/ddraw/surface_dib.c
+++ b/dlls/ddraw/surface_dib.c
@@ -849,7 +849,13 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSU
keylow = lpbltfx->ddckDestColorkey.dwColorSpaceLowValue;
keyhigh = lpbltfx->ddckDestColorkey.dwColorSpaceHighValue;
}
- keymask = sdesc.u4.ddpfPixelFormat.u2.dwRBitMask | sdesc.u4.ddpfPixelFormat.u3.dwGBitMask | sdesc.u4.ddpfPixelFormat.u4.dwBBitMask;
+
+ if(bpp == 1)
+ keymask = 0xff;
+ else
+ keymask = sdesc.u4.ddpfPixelFormat.u2.dwRBitMask | sdesc.u4.ddpfPixelFormat.u3.dwGBitMask |
+ sdesc.u4.ddpfPixelFormat.u4.dwBBitMask;
+
dwFlags &= ~(DDBLT_KEYSRC | DDBLT_KEYDEST | DDBLT_KEYSRCOVERRIDE | DDBLT_KEYDESTOVERRIDE);
}
More information about the wine-cvs
mailing list