From 70e569f79c90833e7c0e06c1d520f39536274d12 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 4 Feb 2016 11:57:26 +0200 Subject: [PATCH] Fixed restoration of window position with OpenGL renderer Software renderer was not affected as it has maximize window button enabled --- src/win32/hardware.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp index 2c3fbdea48..bf1838ae29 100644 --- a/src/win32/hardware.cpp +++ b/src/win32/hardware.cpp @@ -299,7 +299,8 @@ void I_SaveWindowedPos () return; } // Make sure we only save the window position if it's not fullscreen. - if ((GetWindowLong (Window, GWL_STYLE) & WS_OVERLAPPEDWINDOW) == WS_OVERLAPPEDWINDOW) + static const int WINDOW_STYLE = WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX; + if ((GetWindowLong (Window, GWL_STYLE) & WINDOW_STYLE) == WINDOW_STYLE) { RECT wrect;