d3d8: Use wined3d_texture_get_sub_resource_parent() in d3d8_swapchain_GetBackBuffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bdc31c99c4
commit
1e6951cbfc
|
@ -112,7 +112,6 @@ static HRESULT WINAPI d3d8_swapchain_GetBackBuffer(IDirect3DSwapChain8 *iface,
|
|||
UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface8 **backbuffer)
|
||||
{
|
||||
struct d3d8_swapchain *swapchain = impl_from_IDirect3DSwapChain8(iface);
|
||||
struct wined3d_resource *wined3d_resource;
|
||||
struct wined3d_texture *wined3d_texture;
|
||||
struct d3d8_surface *surface_impl;
|
||||
HRESULT hr = D3D_OK;
|
||||
|
@ -131,8 +130,7 @@ static HRESULT WINAPI d3d8_swapchain_GetBackBuffer(IDirect3DSwapChain8 *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->IDirect3DSurface8_iface;
|
||||
IDirect3DSurface8_AddRef(*backbuffer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue