d3d8: Use wined3d_texture_get_sub_resource_parent() in d3d8_device_GetBackBuffer().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-02-16 17:17:29 +01:00 committed by Alexandre Julliard
parent f984f56fd8
commit 1169794f83
1 changed files with 1 additions and 3 deletions

View File

@ -723,7 +723,6 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
struct wined3d_swapchain *wined3d_swapchain;
struct wined3d_resource *wined3d_resource;
struct wined3d_texture *wined3d_texture;
struct d3d8_surface *surface_impl;
@ -743,8 +742,7 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
return D3DERR_INVALIDCALL;
}
wined3d_resource = wined3d_texture_get_sub_resource(wined3d_texture, 0);
surface_impl = wined3d_resource_get_parent(wined3d_resource);
surface_impl = wined3d_texture_get_sub_resource_parent(wined3d_texture, 0);
*backbuffer = &surface_impl->IDirect3DSurface8_iface;
IDirect3DSurface8_AddRef(*backbuffer);