From 47bc397a3081c3f09cfe53cddd4dfcff7b93459e Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 3 Jan 2016 17:48:23 +0100 Subject: [PATCH] Fixed: Don't force 1024x768 windowed if desktop resolution is already 1024x768 or less --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 6e81a4203..fec51a93e 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -990,11 +990,26 @@ void prelogInit() // Check the driver is not is 16 bits checkDriverDepth (); - // For login phase, MUST be in windowed UDriver::CMode mode; - mode.Width = 1024; - mode.Height = 768; - mode.Windowed = true; + + 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) + { + mode.Windowed = false; + forceWindowed1024x768 = false; + } + } + + if (forceWindowed1024x768) + { + mode.Width = 1024; + mode.Height = 768; + mode.Windowed = true; + } // Disable Hardware Vertex Program. if(ClientCfg.DisableVtxProgram)