[4/5] d3dx9: A simple copy isn't enough when a color key is provided.

Józef Kucia joseph.kucia at gmail.com
Sun Oct 28 16:59:57 CDT 2012


---
 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;
 
-- 
1.7.12.4




More information about the wine-patches mailing list