Module: wine Branch: master Commit: 7024ffac9af3c94e16158c19e28ad77854d13218 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7024ffac9af3c94e16158c19e2...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Sun Apr 22 22:47:41 2012 +0200
d3d8: Properly retrieve an interface pointer in IDirect3DDevice8Impl_GetDepthStencilSurface().
---
dlls/d3d8/device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index e10c83c..d50acd5 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1172,6 +1172,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(IDirect3DDevic { IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); struct wined3d_surface *wined3d_surface; + IDirect3DSurface8Impl *surface_impl; HRESULT hr;
TRACE("iface %p, depth_stencil %p.\n", iface, ppZStencilSurface); @@ -1184,7 +1185,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(IDirect3DDevic hr = wined3d_device_get_depth_stencil(This->wined3d_device, &wined3d_surface); if (SUCCEEDED(hr)) { - *ppZStencilSurface = wined3d_surface_get_parent(wined3d_surface); + surface_impl = wined3d_surface_get_parent(wined3d_surface); + *ppZStencilSurface = &surface_impl->IDirect3DSurface8_iface; IDirect3DSurface8_AddRef(*ppZStencilSurface); wined3d_surface_decref(wined3d_surface); }