Module: wine Branch: master Commit: c698052b31231b757bad25665a03ddc3a115d76f URL: http://source.winehq.org/git/wine.git/?a=commit;h=c698052b31231b757bad25665a...
Author: Stefan Dösinger stefan@codeweavers.com Date: Wed Nov 14 22:45:00 2007 +0100
wined3d: Destroy GL contexts before changing the screen resolution.
---
dlls/wined3d/swapchain.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 81f17c3..2eaa812 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -106,6 +106,9 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB HeapFree(GetProcessHeap(), 0, This->backBuffer); }
+ for(i = 0; i < This->num_contexts; i++) { + DestroyContext(This->wineD3DDevice, This->context[i]); + } /* Restore the screen resolution if we rendered in fullscreen * This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9 * this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution @@ -118,9 +121,6 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB mode.Format = This->orig_fmt; IWineD3DDevice_SetDisplayMode((IWineD3DDevice *) This->wineD3DDevice, 0, &mode); } - for(i = 0; i < This->num_contexts; i++) { - DestroyContext(This->wineD3DDevice, This->context[i]); - } HeapFree(GetProcessHeap(), 0, This->context);
HeapFree(GetProcessHeap(), 0, This);