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

This commit is contained in:
Henri Verbeet 2008-09-10 11:08:58 +02:00 committed by Alexandre Julliard
parent c0d770de9e
commit 01539fb926

View file

@ -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) {