ddraw: Use wined3d_texture_get_sub_resource() in ddraw_surface7_Flip().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7d45318aea
commit
b170952230
|
@ -1268,7 +1268,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
|
|||
wined3d_device_set_rendertarget_view(dst_impl->ddraw->wined3d_device, 0, src_rtv, FALSE);
|
||||
wined3d_rendertarget_view_set_parent(src_rtv, dst_impl);
|
||||
dst_impl->wined3d_rtv = src_rtv;
|
||||
wined3d_resource_set_parent(wined3d_surface_get_resource(src_impl->wined3d_surface), dst_impl);
|
||||
wined3d_resource_set_parent(wined3d_texture_get_sub_resource(src_impl->wined3d_texture, 0), dst_impl);
|
||||
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);
|
||||
|
@ -1300,7 +1300,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
|
|||
wined3d_device_set_rendertarget_view(dst_impl->ddraw->wined3d_device, 0, src_rtv, FALSE);
|
||||
wined3d_rendertarget_view_set_parent(src_rtv, dst_impl);
|
||||
dst_impl->wined3d_rtv = src_rtv;
|
||||
wined3d_resource_set_parent(wined3d_surface_get_resource(src_impl->wined3d_surface), dst_impl);
|
||||
wined3d_resource_set_parent(wined3d_texture_get_sub_resource(src_impl->wined3d_texture, 0), dst_impl);
|
||||
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);
|
||||
|
@ -1318,7 +1318,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
|
|||
wined3d_device_set_rendertarget_view(dst_impl->ddraw->wined3d_device, 0, tmp_rtv, FALSE);
|
||||
wined3d_rendertarget_view_set_parent(tmp_rtv, src_impl);
|
||||
src_impl->wined3d_rtv = tmp_rtv;
|
||||
wined3d_resource_set_parent(wined3d_surface_get_resource(tmp), src_impl);
|
||||
wined3d_resource_set_parent(wined3d_texture_get_sub_resource(texture, 0), src_impl);
|
||||
src_impl->wined3d_surface = tmp;
|
||||
wined3d_resource_set_parent(wined3d_texture_get_resource(texture), ddraw_texture);
|
||||
src_impl->wined3d_texture = texture;
|
||||
|
|
|
@ -1890,13 +1890,6 @@ void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
|
|||
return surface->resource.parent;
|
||||
}
|
||||
|
||||
struct wined3d_resource * CDECL wined3d_surface_get_resource(struct wined3d_surface *surface)
|
||||
{
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
return &surface->resource;
|
||||
}
|
||||
|
||||
DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
{
|
||||
unsigned int alignment;
|
||||
|
|
|
@ -224,7 +224,6 @@
|
|||
@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr)
|
||||
@ cdecl wined3d_surface_get_parent(ptr)
|
||||
@ cdecl wined3d_surface_get_pitch(ptr)
|
||||
@ cdecl wined3d_surface_get_resource(ptr)
|
||||
@ cdecl wined3d_surface_set_overlay_position(ptr long long)
|
||||
@ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr)
|
||||
@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr)
|
||||
|
|
|
@ -2476,7 +2476,6 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
|
|||
HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y);
|
||||
void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
|
||||
DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);
|
||||
struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
|
||||
HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y);
|
||||
HRESULT __cdecl wined3d_surface_update_overlay(struct wined3d_surface *surface, const RECT *src_rect,
|
||||
struct wined3d_surface *dst_surface, const RECT *dst_rect, DWORD flags, const WINEDDOVERLAYFX *fx);
|
||||
|
|
Loading…
Reference in New Issue