wined3d: Reset the auto depth stencil.

This commit is contained in:
Henri Verbeet 2008-09-10 11:08:58 +02:00 committed by Alexandre Julliard
parent 43f5d8e5ad
commit d51ea01159
1 changed files with 9 additions and 2 deletions

View File

@ -7356,10 +7356,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
pPresentationParameters->hDeviceWindow != swapchain->presentParms.hDeviceWindow) {
ERR("Cannot change the device window yet\n");
}
if(pPresentationParameters->EnableAutoDepthStencil != swapchain->presentParms.EnableAutoDepthStencil) {
ERR("What do do about a changed auto depth stencil parameter?\n");
if (pPresentationParameters->EnableAutoDepthStencil && !This->auto_depth_stencil_buffer) {
WARN("Auto depth stencil enabled, but no auto depth stencil present, returning WINED3DERR_INVALIDCALL\n");
return WINED3DERR_INVALIDCALL;
}
/* Reset the depth stencil */
if (pPresentationParameters->EnableAutoDepthStencil)
IWineD3DDevice_SetDepthStencilSurface(iface, This->auto_depth_stencil_buffer);
else
IWineD3DDevice_SetDepthStencilSurface(iface, NULL);
delete_opengl_contexts(iface, (IWineD3DSwapChain *) swapchain);
if(pPresentationParameters->Windowed) {