Fix the default value for keylow in DIB_DirectDrawSurface_Blt.

Unset DDBLT_DDFX when lpbltfx is NULL / contains no dwDDFX.
This commit is contained in:
H. Verbeet 2005-11-14 12:27:31 +00:00 committed by Alexandre Julliard
parent 6e20af5dac
commit 9bf1fe622d
1 changed files with 3 additions and 1 deletions

View File

@ -538,6 +538,8 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
IDirectDrawSurface7_Lock(iface,NULL,&ddesc,DDLOCK_WRITEONLY,0);
}
if (!lpbltfx || !(lpbltfx->dwDDFX)) dwFlags &= ~DDBLT_DDFX;
if ((sdesc.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC) &&
(ddesc.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC)) {
if (sdesc.u4.ddpfPixelFormat.dwFourCC != sdesc.u4.ddpfPixelFormat.dwFourCC) {
@ -831,7 +833,7 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
}
} else {
LONG dstyinc = ddesc.u1.lPitch, dstxinc = bpp;
DWORD keylow = 0, keyhigh = 0, keymask = 0xFFFFFFFF;
DWORD keylow = 0xFFFFFFFF, keyhigh = 0, keymask = 0xFFFFFFFF;
if (dwFlags & (DDBLT_KEYSRC | DDBLT_KEYDEST | DDBLT_KEYSRCOVERRIDE | DDBLT_KEYDESTOVERRIDE)) {
if (dwFlags & DDBLT_KEYSRC) {