Henri Verbeet : d3d8: GetDepthStencilSurface returns D3DERR_NOTFOUND when no depth stencil is present .

Alexandre Julliard julliard at winehq.org
Wed Sep 10 06:01:49 CDT 2008


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Sep 10 11:08:58 2008 +0200

d3d8: GetDepthStencilSurface returns D3DERR_NOTFOUND when no depth stencil is present.

---

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

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index a81bf78..e877456 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -853,16 +853,17 @@ static HRESULT  WINAPI  IDirect3DDevice8Impl_GetDepthStencilSurface(LPDIRECT3DDE
 
     EnterCriticalSection(&d3d8_cs);
     hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface);
-    if(hr == D3D_OK && pZStencilSurface != NULL){
+    if (hr == WINED3D_OK) {
         IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface);
         IWineD3DSurface_Release(pZStencilSurface);
     }else{
-        FIXME("Call to IWineD3DDevice_GetDepthStencilSurface failed\n");
+        if (hr != WINED3DERR_NOTFOUND)
+                FIXME("Call to IWineD3DDevice_GetDepthStencilSurface failed with 0x%08x\n", hr);
         *ppZStencilSurface = NULL;
     }
     LeaveCriticalSection(&d3d8_cs);
 
-    return D3D_OK;
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DDevice8Impl_BeginScene(LPDIRECT3DDEVICE8 iface) {




More information about the wine-cvs mailing list