Fix for bug 822

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes bug#822 DIB_DirectDrawSurface_Blt function does not currently support
DDBLT_KEYSRCOVERRIDE



Changelog: Added support for DDBLT_KEYSRCOVERRIDE/DDBLT_KEYDESTOVERRIDE



Tony Lambregts tony_lambregts@telusplanet.net



Index: dib.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/dib.c,v
retrieving revision 1.10
diff -u -r1.10 dib.c
--- dib.c	31 May 2002 23:25:46 -0000	1.10
+++ dib.c	26 Jun 2002 05:56:59 -0000
@@ -542,19 +542,24 @@
 		    last_sy = sy;
 		}
 	    }
-	} else if (dwFlags & (DDBLT_KEYSRC | DDBLT_KEYDEST)) {
+	} else if (dwFlags & (DDBLT_KEYSRC | DDBLT_KEYDEST | DDBLT_KEYSRCOVERRIDE | DDBLT_KEYDESTOVERRIDE)) {
 	    DWORD keylow, keyhigh;
 
 	    if (dwFlags & DDBLT_KEYSRC) {
 		keylow  = sdesc.ddckCKSrcBlt.dwColorSpaceLowValue;
 		keyhigh = sdesc.ddckCKSrcBlt.dwColorSpaceHighValue;
-	    } else {
+	    } else if (dwFlags & DDBLT_KEYDEST){
 		/* I'm not sure if this is correct */
 		FIXME("DDBLT_KEYDEST not fully supported yet.\n");
 		keylow  = ddesc.ddckCKDestBlt.dwColorSpaceLowValue;
 		keyhigh = ddesc.ddckCKDestBlt.dwColorSpaceHighValue;
-	    }
-
+	    } else if (dwFlags & DDBLT_KEYSRCOVERRIDE) {
+		keylow  = lpbltfx->ddckSrcColorkey.dwColorSpaceLowValue;
+		keyhigh = lpbltfx->ddckSrcColorkey.dwColorSpaceHighValue;
+	    } else {
+		keylow  = lpbltfx->ddckDestColorkey.dwColorSpaceLowValue;
+		keyhigh = lpbltfx->ddckDestColorkey.dwColorSpaceHighValue;
+	    } 
 
 	    for (y = sy = 0; y < dstheight; y++, sy += yinc) {
 		sbuf = sbase + (sy >> 16) * sdesc.u1.lPitch;
@@ -580,7 +585,7 @@
 		dbuf += ddesc.u1.lPitch;
 	    }
 #undef COPYROW_COLORKEY
-	    dwFlags &= ~(DDBLT_KEYSRC | DDBLT_KEYDEST);
+	    dwFlags &= ~(DDBLT_KEYSRC | DDBLT_KEYDEST | DDBLT_KEYSRCOVERRIDE | DDBLT_KEYDESTOVERRIDE);
 	}
     }
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux