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

This commit is contained in:
Józef Kucia 2012-10-28 22:59:57 +01:00 committed by Alexandre Julliard
parent 08a5dbbb8e
commit 4f50e751e1
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

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