Module: wine Branch: refs/heads/master Commit: 99f67c676b73bc5138fd27f072cd788a29292c42 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=99f67c676b73bc5138fd27f0...
Author: Ivan Gyurdiev ivg231@gmail.com Date: Thu Jul 20 23:06:32 2006 -0400
wined3d: Respect EnableAutoDepthStencil parameter.
---
dlls/wined3d/device.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index babbb9b..53c4986 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1752,7 +1752,7 @@ #endif }
/* Under directX swapchains share the depth stencil, so only create one depth-stencil */ - if (pPresentationParameters->EnableAutoDepthStencil && hr == WINED3D_OK) { + if (*(pPresentationParameters->EnableAutoDepthStencil) && hr == WINED3D_OK) { TRACE("Creating depth stencil buffer\n"); if (This->depthStencilBuffer == NULL ) { hr = D3DCB_CreateDepthStencil((IUnknown *) This->parent, @@ -2127,12 +2127,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl TRACE("Setting rendertarget to NULL\n"); This->renderTarget = NULL;
- IWineD3DSurface_GetParent(This->depthStencilBuffer, &stencilBufferParent); - IUnknown_Release(stencilBufferParent); /* once for the get parent */ - if(IUnknown_Release(stencilBufferParent) >0){ /* the second time for when it was created */ - FIXME("(%p) Something's still holding the depthStencilBuffer\n",This); + if (This->depthStencilBuffer) { + IWineD3DSurface_GetParent(This->depthStencilBuffer, &stencilBufferParent); + IUnknown_Release(stencilBufferParent); /* once for the get parent */ + if(IUnknown_Release(stencilBufferParent) >0){ /* the second time for when it was created */ + FIXME("(%p) Something's still holding the depthStencilBuffer\n",This); + } + This->depthStencilBuffer = NULL; } - This->depthStencilBuffer = NULL;
for(i=0; i < This->NumberOfSwapChains; i++) { TRACE("Releasing the implicit swapchain %d\n", i);