Module: wine Branch: master Commit: 62a92d160e57a5a8fceedb90fd393d14e1379d9e URL: http://source.winehq.org/git/wine.git/?a=commit;h=62a92d160e57a5a8fceedb90fd...
Author: Stefan Dösinger stefan@codeweavers.com Date: Wed Feb 6 22:12:06 2008 +0100
wined3d: Restore the Window size on reset.
---
dlls/wined3d/device.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c504e50..bf41d08 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6958,6 +6958,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE IWineD3DDevice_SetFullscreen(iface, FALSE); } swapchain->presentParms.Windowed = pPresentationParameters->Windowed; + } else if(!pPresentationParameters->Windowed) { + DWORD style = This->style, exStyle = This->exStyle; + /* If we're in fullscreen, and the mode wasn't changed, we have to get the window back into + * the right position. Some applications(Battlefield 2, Guild Wars) move it and then call + * Reset to clear up their mess. Guild Wars also loses the device during that. + */ + This->style = 0; + This->exStyle = 0; + IWineD3DDeviceImpl_SetupFullscreenWindow(iface, This->ddraw_window); + This->style = style; + This->exStyle = exStyle; }
/* Recreate the primary swapchain's context */