d3d8: Use wined3d_texture_get_sub_resource_parent() in d3d8_device_create_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1169794f83
commit
d772076aff
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue