summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 270af12e8..d83395795 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -319,15 +319,13 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen)
#if !defined(WINCE)
AdjustWindowRect(&r, style, FALSE);
#endif
- w = r.right - r.left;
- h = r.bottom - r.top;
- x = (GetSystemMetrics(SM_CXSCREEN) - w) / 2;
- y = (GetSystemMetrics(SM_CYSCREEN) - h) / 2;
-
- if (_wnd.main_wnd) {
- ShowWindow(_wnd.main_wnd, SW_SHOWNORMAL); // remove maximize-flag
- SetWindowPos(_wnd.main_wnd, 0, x, y, w, h, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER);
- } else {
+
+ if (_wnd.main_wnd == NULL) {
+ w = r.right - r.left;
+ h = r.bottom - r.top;
+ x = (GetSystemMetrics(SM_CXSCREEN) - w) / 2;
+ y = (GetSystemMetrics(SM_CYSCREEN) - h) / 2;
+
TCHAR Windowtitle[50];
_sntprintf(Windowtitle, lengthof(Windowtitle), _T("OpenTTD %s"), MB_TO_WIDE(_openttd_revision));