Henri Verbeet : wined3d: Release the stateblock before destroying the GL context.
Alexandre Julliard
julliard at winehq.org
Fri Sep 25 10:25:38 CDT 2009
Module: wine
Branch: master
Commit: cd96c6e355599d7b5bb230d276bd18602ff6c2f7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cd96c6e355599d7b5bb230d276bd18602ff6c2f7
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Sep 25 13:31:50 2009 +0200
wined3d: Release the stateblock before destroying the GL context.
---
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);
More information about the wine-cvs
mailing list