[PATCH 10/11] wined3d: Release the stateblock before destroying the GL context.
Henri Verbeet
hverbeet at codeweavers.com
Fri Sep 25 06:31:50 CDT 2009
---
dlls/wined3d/device.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0c6ebb7..70656b7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -7057,6 +7057,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
else
IWineD3DDevice_SetDepthStencilSurface(iface, NULL);
+ TRACE("Resetting stateblock\n");
+ IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->updateStateBlock);
+ IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock);
+
delete_opengl_contexts(iface, (IWineD3DSwapChain *) swapchain);
if(pPresentationParameters->Windowed) {
@@ -7131,10 +7135,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
This->exStyle = exStyle;
}
- TRACE("Resetting stateblock\n");
- IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->updateStateBlock);
- IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock);
-
/* Note: No parent needed for initial internal stateblock */
hr = IWineD3DDevice_CreateStateBlock(iface, WINED3DSBT_INIT, (IWineD3DStateBlock **)&This->stateBlock, NULL);
if (FAILED(hr)) ERR("Resetting the stateblock failed with error 0x%08x\n", hr);
--
1.6.0.6
More information about the wine-patches
mailing list