d3d9: Return the correct return value in GetDepthStencilSurface.

This commit is contained in:
Stefan Dösinger 2007-08-14 20:23:52 +02:00 committed by Alexandre Julliard
parent 6857fc6b61
commit cc563b9c69
1 changed files with 11 additions and 8 deletions

View File

@ -594,15 +594,18 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(LPDIRECT3DDE
EnterCriticalSection(&d3d9_cs); EnterCriticalSection(&d3d9_cs);
hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface); hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface);
if(hr == D3D_OK && pZStencilSurface != NULL){ if(hr == D3D_OK) {
if(pZStencilSurface != NULL){
IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface); IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface);
IWineD3DSurface_Release(pZStencilSurface); IWineD3DSurface_Release(pZStencilSurface);
} else { } else {
FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
*ppZStencilSurface = NULL; *ppZStencilSurface = NULL;
} }
} else {
WARN("Call to IWineD3DDevice_GetDepthStencilSurface failed\n");
}
LeaveCriticalSection(&d3d9_cs); LeaveCriticalSection(&d3d9_cs);
return D3D_OK; return hr;
} }
static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(LPDIRECT3DDEVICE9 iface) { static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(LPDIRECT3DDEVICE9 iface) {