diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-03-01 23:18:53 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-03-01 23:41:39 +0100 |
commit | b7a44983b432a85f99b5d82493c3396e5833d245 (patch) | |
tree | 61f6bfde399edae6a27c0c80cdb6c3d805e82196 | |
parent | 74aa934441351334e40d8963900b8a2fbc9bc9cd (diff) | |
download | openttd-b7a44983b432a85f99b5d82493c3396e5833d245.tar.xz |
Fix: [Win32] Original window size was lost when tabbing in and out of fullscreen.
-rw-r--r-- | src/video/win32_v.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index d5f752be9..8200be887 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -715,7 +715,9 @@ LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (video_driver->fullscreen) { if (active && minimized) { /* Restore the game window */ + Dimension d = _bck_resolution; // Save current non-fullscreen window size as it will be overwritten by ShowWindow. ShowWindow(hwnd, SW_RESTORE); + _bck_resolution = d; video_driver->MakeWindow(true); } else if (!active && !minimized) { /* Minimise the window and restore desktop */ |