On Fri, Aug 22, 2008 at 02:51:56PM +0700, Andrew Fenn wrote:
I made a new patch this time including a test.
I put in some extra checking in SetScissorRect making sure that if rect was null or it was an invalid rectangle that it was returned as invalid as it should be.
I'm not able to do a test on windows so if anyone does one please let me know if there are any problems. Also please tell me if you spot any problems with this patch.
--- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -746,7 +746,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(LPDIRECT3DDE } } else { WARN("Call to IWineD3DDevice_GetDepthStencilSurface failed\n");
*ppZStencilSurface = NULL;
/* *ppZStencilSurface = NULL; */
} LeaveCriticalSection(&d3d9_cs); return hr;return D3DERR_NOTFOUND;
Again, you should likely add a LeaveCriticalSection(&d3d9_cs); to the error return too.
Or just set hr = D3DERR_NOTFOUND; and fall through.
Ciao, Marcus