d3d8: Properly retrieve an interface pointer in IDirect3DSwapChain8Impl_GetBackBuffer().
This commit is contained in:
parent
bd3a941b20
commit
532d224692
|
@ -110,6 +110,7 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(IDirect3DSwapChain8
|
|||
{
|
||||
IDirect3DSwapChain8Impl *This = impl_from_IDirect3DSwapChain8(iface);
|
||||
struct wined3d_surface *wined3d_surface = NULL;
|
||||
IDirect3DSurface8Impl *surface_impl;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
|
||||
|
@ -120,7 +121,8 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(IDirect3DSwapChain8
|
|||
iBackBuffer, (enum wined3d_backbuffer_type)Type, &wined3d_surface);
|
||||
if (SUCCEEDED(hr) && wined3d_surface)
|
||||
{
|
||||
*ppBackBuffer = wined3d_surface_get_parent(wined3d_surface);
|
||||
surface_impl = wined3d_surface_get_parent(wined3d_surface);
|
||||
*ppBackBuffer = &surface_impl->IDirect3DSurface8_iface;
|
||||
IDirect3DSurface8_AddRef(*ppBackBuffer);
|
||||
wined3d_surface_decref(wined3d_surface);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue