From fabcdcd84d5cd488229f5ea5a1eca402442e6364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Ro=C3=9F?= Date: Sun, 21 Apr 2024 17:40:22 +0200 Subject: [PATCH] [Windows] Temporary workaround to keep the window resolution as it was before the changes to fix the preprocessor defines for the Release build. --- win32/winapp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/win32/winapp.cpp b/win32/winapp.cpp index 428f11a2..f5382de6 100644 --- a/win32/winapp.cpp +++ b/win32/winapp.cpp @@ -251,7 +251,13 @@ oeWin32Application::oeWin32Application(const char *name, unsigned flags, HInstan } else { // initialize main window and display it. #ifdef RELEASE - SetRect(&rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); + // TODO: Fix custom window resolution when original code below is active. + // After the change to properly set RELEASE for Release builds, this call + // breaks resolution of menu screens, videos and ingame huds. + // So for now, we keep the debug version of this call that was active before + // that change and works consistently at least. + //SetRect(&rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); + SetRect(&rect, 0, 0, 640, 480); #else SetRect(&rect, 0, 0, 640, 480); #endif