Commit 4f50e751 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

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

parent 08a5dbbb
...@@ -1668,7 +1668,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, ...@@ -1668,7 +1668,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
if (src_format == surfdesc.Format if (src_format == surfdesc.Format
&& dst_size.width == src_size.width && 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) if (src_rect->left & (srcformatdesc->block_width - 1)
|| src_rect->top & (srcformatdesc->block_height - 1) || src_rect->top & (srcformatdesc->block_height - 1)
......
...@@ -148,7 +148,10 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume, ...@@ -148,7 +148,10 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
return E_NOTIMPL; return E_NOTIMPL;
if (desc.Format == src_format 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; const BYTE *src_addr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment