From a81152df36d96754dd3ce81c6860079d1a90e489 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 23 Feb 2016 18:21:58 +0100 Subject: [PATCH] d3d9: Use wined3d_texture_get_sub_resource_parent() in d3d9_swapchain_GetBackBuffer(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d9/swapchain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index 91a22a3784a..b9343aa92da 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -152,7 +152,6 @@ static HRESULT WINAPI d3d9_swapchain_GetBackBuffer(IDirect3DSwapChain9Ex *iface, UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface9 **backbuffer) { struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); - struct wined3d_resource *wined3d_resource; struct wined3d_texture *wined3d_texture; struct d3d9_surface *surface_impl; HRESULT hr = D3D_OK; @@ -171,8 +170,7 @@ static HRESULT WINAPI d3d9_swapchain_GetBackBuffer(IDirect3DSwapChain9Ex *iface, wined3d_mutex_lock(); if ((wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain, backbuffer_idx))) { - 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->IDirect3DSurface9_iface; IDirect3DSurface9_AddRef(*backbuffer); }