diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 41dcafb..6ead34d 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1365,6 +1365,18 @@ static void test_depthstenciltest(void) ok(hr == D3DERR_NOTFOUND && pDepthStencil2 == NULL, "IDirect3DDevice9_GetDepthStencilSurface failed with %08x\n", hr); if(pDepthStencil2) IDirect3DSurface9_Release(pDepthStencil2); + /* the DepthStencilSurface is NULL and Reset should add a new one ?? + * At least this provocates a INVALIDCALL in GetDepthStencil afterwards */ +#define testnumber 10 + pDepthStencil2 = testnumber; /* set a value so that we could check if it is changed after an invalid call */ + hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset failed with %08x\n", hr); + hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &pDepthStencil2); + ok(hr == D3DERR_INVALIDCALL && pDepthStencil2 == testnumber, "IDirect3DDevice9_GetDepthStencilSurface failed %08x (%08x) pDepthStencil %08x (%08x)\n", hr, D3DERR_INVALIDCALL, pDepthStencil2, testnumber); + if(pDepthStencil2 != testnumber && pDepthStencil2 != 0) IDirect3DSurface9_Release(pDepthStencil2); + pDepthStencil2 = 0; +exit(0); + /* This left the render states untouched! */ hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_ZENABLE, &state); ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr);