mirror of https://github.com/OpenTTD/OpenTTD
Fix: [Win32] Original window size was lost when tabbing in and out of fullscreen.
parent
74aa934441
commit
b7a44983b4
|
@ -715,7 +715,9 @@ LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
if (video_driver->fullscreen) {
|
if (video_driver->fullscreen) {
|
||||||
if (active && minimized) {
|
if (active && minimized) {
|
||||||
/* Restore the game window */
|
/* 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);
|
ShowWindow(hwnd, SW_RESTORE);
|
||||||
|
_bck_resolution = d;
|
||||||
video_driver->MakeWindow(true);
|
video_driver->MakeWindow(true);
|
||||||
} else if (!active && !minimized) {
|
} else if (!active && !minimized) {
|
||||||
/* Minimise the window and restore desktop */
|
/* Minimise the window and restore desktop */
|
||||||
|
|
Loading…
Reference in New Issue