diff options
author | truebrain <truebrain@openttd.org> | 2012-04-30 16:49:26 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2012-04-30 16:49:26 +0000 |
commit | 353fd97de6d649440d01f1682ee5580e19d32768 (patch) | |
tree | 61bddcd0e64bb18ff974db6b5966fb4be32113d0 /src/video | |
parent | 39912b7bdee684ea838303ec5fb1513977131b74 (diff) | |
download | openttd-353fd97de6d649440d01f1682ee5580e19d32768.tar.xz |
(svn r24189) -Fix: when going to fullscreen and back, restore to the resolution you were, not to the fullscreen resolution (Windows only)
Diffstat (limited to 'src/video')
-rw-r--r-- | src/video/win32_v.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index d83395795..df7510084 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -296,6 +296,9 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen) } else if (_wnd.fullscreen) { /* restore display? */ ChangeDisplaySettings(NULL, 0); + /* restore the resolution */ + _wnd.width = _bck_resolution.width; + _wnd.height = _bck_resolution.height; } #endif @@ -628,7 +631,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP /* Set maximized flag when we maximize (obviously), but also when we * switched to fullscreen from a maximized state */ _window_maximize = (wParam == SIZE_MAXIMIZED || (_window_maximize && _fullscreen)); - if (_window_maximize) _bck_resolution = _cur_resolution; + if (_window_maximize || _fullscreen) _bck_resolution = _cur_resolution; ClientSizeChanged(LOWORD(lParam), HIWORD(lParam)); } return 0; |