wined3d: Destroy GL contexts before changing the screen resolution.

This commit is contained in:
Stefan Dösinger 2007-11-14 22:45:00 +01:00 committed by Alexandre Julliard
parent 683c258ff4
commit c698052b31
1 changed files with 3 additions and 3 deletions

View File

@ -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);