From eee4684b0c7db1beb204eb50abce27d5412763a7 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 15 Mar 2019 15:41:02 +0200 Subject: [PATCH] Fixed: Invalid window mode switch in some cases. --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index b653127f4..d80cfda00 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -1096,23 +1096,21 @@ void prelogInit() UDriver::CMode mode; - bool forceWindowed1024x768 = true; - if (Driver->getCurrentScreenMode(mode)) { - // if screen mode lower than 1024x768, use same mode in fullscreen - if (mode.Width <= 1024 && mode.Height <= 768) + // use current mode if its smaller than 1024x768 + // mode should be windowed already, but incase its not, use the mode as is + if (mode.Windowed && (mode.Width > 1024 && mode.Height > 768)) { - mode.Windowed = false; - forceWindowed1024x768 = false; + mode.Width = 1024; + mode.Height = 768; } } - - if (forceWindowed1024x768) + else { - mode.Width = 1024; - mode.Height = 768; - mode.Windowed = true; + mode.Width = 1024; + mode.Height = 768; + mode.Windowed = true; } // Disable Hardware Vertex Program.