From 487f184cd9d1fe9a5e32b1a5a9976015c1a70273 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Mon, 7 Sep 2015 22:35:45 +0200 Subject: [PATCH] Fix #7886 (window scaling issue) --- Windows/WndMainWindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 79a65fc7f9..521989b758 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -256,7 +256,12 @@ namespace MainWindow } static bool IsWindowSmall() { - return g_Config.IsPortrait() ? (g_Config.iWindowHeight < 480 + 80) : (g_Config.iWindowWidth < 480 + 80); + // Can't take this from config as it will not be set if windows is maximized. + RECT rc; + GetWindowRect(hwndMain, &rc); + int width = rc.right - rc.left; + int height = rc.bottom - rc.top; + return g_Config.IsPortrait() ? (height < 480 + 80) : (width < 480 + 80); } static void ResizeDisplay(bool noWindowMovement = false) {