Henri Verbeet : d3d9: Properly retrieve an interface pointer in IDirect3DDevice9Impl_GetDepthStencilSurface ().

Alexandre Julliard julliard at winehq.org
Thu Apr 26 13:58:35 CDT 2012


Module: wine
Branch: master
Commit: e333334450eaf6f4c984e5d3fbb17f4f7a5583e1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e333334450eaf6f4c984e5d3fbb17f4f7a5583e1

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Apr 25 21:24:19 2012 +0200

d3d9: Properly retrieve an interface pointer in IDirect3DDevice9Impl_GetDepthStencilSurface().

---

 dlls/d3d9/device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index a88dc73..812de68 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1244,6 +1244,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(IDirect3DDevic
 {
     IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface);
     struct wined3d_surface *wined3d_surface;
+    IDirect3DSurface9Impl *surface_impl;
     HRESULT hr;
 
     TRACE("iface %p, depth_stencil %p.\n", iface, ppZStencilSurface);
@@ -1256,7 +1257,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_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->IDirect3DSurface9_iface;
         IDirect3DSurface9_AddRef(*ppZStencilSurface);
         wined3d_surface_decref(wined3d_surface);
     }




More information about the wine-cvs mailing list