[PATCH 1/4] ddraw: Properly set the color key in texture::load
Stefan Dösinger
stefan at codeweavers.com
Tue Jan 31 07:49:16 CST 2012
This fixes bug 29122.
---
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 f4a4d56..e5433f6 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
--
1.7.3.4
More information about the wine-patches
mailing list