=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3dx9: A simple copy isn' t enough when a color key is provided.

Alexandre Julliard julliard at winehq.org
Mon Oct 29 13:52:51 CDT 2012


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

Author: Józef Kucia <joseph.kucia at gmail.com>
Date:   Sun Oct 28 22:59:57 2012 +0100

d3dx9: A simple copy isn't enough when a color key is provided.

---

 dlls/d3dx9_36/surface.c |    3 ++-
 dlls/d3dx9_36/volume.c  |    5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index eae1649..fa63e01 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -1668,7 +1668,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
 
     if (src_format == surfdesc.Format
             && dst_size.width == src_size.width
-            && dst_size.height == src_size.height) /* Simple copy. */
+            && dst_size.height == src_size.height
+            && color_key == 0) /* Simple copy. */
     {
         if (src_rect->left & (srcformatdesc->block_width - 1)
                 || src_rect->top & (srcformatdesc->block_height - 1)
diff --git a/dlls/d3dx9_36/volume.c b/dlls/d3dx9_36/volume.c
index 5664c79..0dc0810 100644
--- a/dlls/d3dx9_36/volume.c
+++ b/dlls/d3dx9_36/volume.c
@@ -148,7 +148,10 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
         return E_NOTIMPL;
 
     if (desc.Format == src_format
-            && dst_size.width == src_size.width && dst_size.height == src_size.height && dst_size.depth == src_size.depth)
+            && dst_size.width == src_size.width
+            && dst_size.height == src_size.height
+            && dst_size.depth == src_size.depth
+            && color_key == 0)
     {
         const BYTE *src_addr;
 




More information about the wine-cvs mailing list