=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: ddraw: Properly set the color key in texture::load.

Alexandre Julliard julliard at winehq.org
Tue Jan 31 14:06:19 CST 2012


Module: wine
Branch: master
Commit: 551c732d744d3f5991af114b3157b641ccdcbac2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=551c732d744d3f5991af114b3157b641ccdcbac2

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Jan 31 14:49:16 2012 +0100

ddraw: Properly set the color key in texture::load.

---

 dlls/ddraw/surface.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index ced64a9..2e97510 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -4967,12 +4967,12 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
         {
             struct wined3d_mapped_rect src_rect, dst_rect;
 
-            /* Copy also the ColorKeying stuff */
+            /* Copy the src blit color key if the source has one, don't erase
+             * the destination's ckey if the source has none */
             if (src_desc->dwFlags & DDSD_CKSRCBLT)
             {
-                dst_desc->dwFlags |= DDSD_CKSRCBLT;
-                dst_desc->ddckCKSrcBlt.dwColorSpaceLowValue = src_desc->ddckCKSrcBlt.dwColorSpaceLowValue;
-                dst_desc->ddckCKSrcBlt.dwColorSpaceHighValue = src_desc->ddckCKSrcBlt.dwColorSpaceHighValue;
+                IDirectDrawSurface7_SetColorKey(&dst_surface->IDirectDrawSurface7_iface,
+                        DDCKEY_SRCBLT, &src_desc->ddckCKSrcBlt);
             }
 
             /* Copy the main memory texture into the surface that corresponds




More information about the wine-cvs mailing list