From d772076aff58cfab92f51ce69f59b0e3b6c211dd Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 16 Feb 2016 17:17:30 +0100 Subject: [PATCH] d3d8: Use wined3d_texture_get_sub_resource_parent() in d3d8_device_create_surface(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d8/device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index d235cc56e1c..5bc39a62944 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -937,7 +937,6 @@ static HRESULT d3d8_device_create_surface(struct d3d8_device *device, UINT width D3DFORMAT format, DWORD flags, IDirect3DSurface8 **surface, UINT usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) { - struct wined3d_resource *sub_resource; struct wined3d_resource_desc desc; struct d3d8_surface *surface_impl; struct wined3d_texture *texture; @@ -969,8 +968,7 @@ static HRESULT d3d8_device_create_surface(struct d3d8_device *device, UINT width return hr; } - sub_resource = wined3d_texture_get_sub_resource(texture, 0); - surface_impl = wined3d_resource_get_parent(sub_resource); + surface_impl = wined3d_texture_get_sub_resource_parent(texture, 0); surface_impl->parent_device = &device->IDirect3DDevice8_iface; *surface = &surface_impl->IDirect3DSurface8_iface; IDirect3DSurface8_AddRef(*surface); -- 2.11.4.GIT