Stefan Dösinger : d3d9: Return the correct return value in GetDepthStencilSurface.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 27 06:07:39 CDT 2007


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Aug 14 20:23:52 2007 +0200

d3d9: Return the correct return value in GetDepthStencilSurface.

---

 dlls/d3d9/device.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index aa65c7e..d48587f 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -593,16 +593,19 @@ static HRESULT  WINAPI  IDirect3DDevice9Impl_GetDepthStencilSurface(LPDIRECT3DDE
     }
 
     EnterCriticalSection(&d3d9_cs);
-    hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface);
-    if(hr == D3D_OK && pZStencilSurface != NULL){
-        IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface);
-        IWineD3DSurface_Release(pZStencilSurface);
-    }else{
-        FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
-        *ppZStencilSurface = NULL;
+    hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface);
+    if(hr == D3D_OK) {
+        if(pZStencilSurface != NULL){
+            IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface);
+            IWineD3DSurface_Release(pZStencilSurface);
+        } else {
+            *ppZStencilSurface = NULL;
+        }
+    } else {
+        WARN("Call to IWineD3DDevice_GetDepthStencilSurface failed\n");
     }
     LeaveCriticalSection(&d3d9_cs);
-    return D3D_OK;
+    return hr;
 }
 
 static HRESULT  WINAPI  IDirect3DDevice9Impl_BeginScene(LPDIRECT3DDEVICE9 iface) {




More information about the wine-cvs mailing list