Commit 8ae45801 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Print an ERR for non-zero sub-resource indices in ddraw_surface7_Flip().

parent f7e9604c
......@@ -1239,6 +1239,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
tmp_rtv = ddraw_surface_get_rendertarget_view(dst_impl);
tmp = dst_impl->wined3d_surface;
if (dst_impl->sub_resource_idx)
ERR("Invalid sub-resource index %u on surface %p.\n", dst_impl->sub_resource_idx, dst_impl);
texture = dst_impl->wined3d_texture;
rtv = wined3d_device_get_rendertarget_view(dst_impl->ddraw->wined3d_device, 0);
ddraw_texture = wined3d_texture_get_parent(dst_impl->wined3d_texture);
......@@ -1271,6 +1273,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
dst_impl->wined3d_surface = src_impl->wined3d_surface;
prev_ddraw_texture = wined3d_texture_get_parent(src_impl->wined3d_texture);
wined3d_resource_set_parent(wined3d_texture_get_resource(src_impl->wined3d_texture), ddraw_texture);
if (src_impl->sub_resource_idx)
ERR("Invalid sub-resource index %u on surface %p.\n", src_impl->sub_resource_idx, src_impl);
dst_impl->wined3d_texture = src_impl->wined3d_texture;
ddraw_texture = prev_ddraw_texture;
}
......@@ -1302,6 +1306,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
prev_ddraw_texture = wined3d_texture_get_parent(src_impl->wined3d_texture);
wined3d_resource_set_parent(wined3d_texture_get_resource(src_impl->wined3d_texture), ddraw_texture);
ddraw_texture = prev_ddraw_texture;
if (src_impl->sub_resource_idx)
ERR("Invalid sub-resource index %u on surface %p.\n", src_impl->sub_resource_idx, src_impl);
dst_impl->wined3d_texture = src_impl->wined3d_texture;
dst_impl = src_impl;
}
......
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