diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 8ddb0cb1f0b..dd0b9ee2e01 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -988,7 +988,6 @@ static HRESULT WINAPI d3d8_device_CopyRects(IDirect3DDevice8 *iface, struct wined3d_resource_desc wined3d_desc; struct wined3d_resource *wined3d_resource; UINT src_w, src_h; - HRESULT hr; TRACE("iface %p, src_surface %p, src_rects %p, rect_count %u, dst_surface %p, dst_points %p.\n", iface, src_surface, src_rects, rect_count, dst_surface, dst_points); @@ -1020,24 +1019,13 @@ static HRESULT WINAPI d3d8_device_CopyRects(IDirect3DDevice8 *iface, dst_format = wined3d_desc.format; /* Check that the source and destination formats match */ - if (src_format != dst_format && WINED3DFMT_UNKNOWN != dst_format) + if (src_format != dst_format) { WARN("Source %p format must match the destination %p format, returning D3DERR_INVALIDCALL.\n", src_surface, dst_surface); wined3d_mutex_unlock(); return D3DERR_INVALIDCALL; } - else if (WINED3DFMT_UNKNOWN == dst_format) - { - TRACE("Converting destination surface from WINED3DFMT_UNKNOWN to the source format.\n"); - if (FAILED(hr = wined3d_surface_update_desc(dst->wined3d_surface, wined3d_desc.width, wined3d_desc.height, - src_format, wined3d_desc.multisample_type, wined3d_desc.multisample_quality, NULL, 0))) - { - WARN("Failed to update surface desc, hr %#x.\n", hr); - wined3d_mutex_unlock(); - return hr; - } - } /* Quick if complete copy ... */ if (!rect_count && !src_rects && !dst_points)