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.
This commit is contained in:
Peter Beutner 2006-02-25 13:34:52 +01:00 committed by Alexandre Julliard
parent 7d97f29c24
commit 07fe82dd55
1 changed files with 7 additions and 1 deletions

View File

@ -849,7 +849,13 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
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);
}