In CD3D9Driver::reset() the pID3DDevice is reset, i believe the check for the result isnt in the correct place.
I believe the code should be changed:
Code: Select all
HRESULT hr = pID3DDevice->Reset(&present);
/* Code to be moved*/
if (FAILED(hr))
{
/* All the error checks */
return false;
}
/*Move the code here */
In my situation the reset resulted in D3DERR_INVALIDCALL, but since the following line is above the error checking it throws an exception.
Code: Select all
pID3DDevice->GetDepthStencilSurface(&(DepthBuffers[0]->Surface));