Module: wine Branch: master Commit: d51ea0115913daa630ad64a0b2bb6301a3bcc0ce URL: http://source.winehq.org/git/wine.git/?a=commit;h=d51ea0115913daa630ad64a0b2...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Sep 10 11:08:58 2008 +0200
wined3d: Reset the auto depth stencil.
---
dlls/wined3d/device.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3cfc606..9e0cf4f 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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) {