From ac85ab1d79d8958ca34dcb1c5d4acdc0a90d8831 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 22 Sep 2015 09:46:51 +0200 Subject: [PATCH] Changed: If Width and Height are invalid, use current screen mode --- code/ryzom/client/src/init.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index a6883eacd..9b5e5ca10 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -953,6 +953,22 @@ void prelogInit() return; } + if (ClientCfg.Width <= 0 || ClientCfg.Height <= 0) + { + UDriver::CMode mode; + + if (!ClientCfg.Windowed && Driver->getCurrentScreenMode(mode)) + { + ClientCfg.Width = mode.Width; + ClientCfg.Height = mode.Height; + } + else + { + ClientCfg.Width = 1024; + ClientCfg.Height = 768; + } + } + CLoginProgressPostThread::getInstance().step(CLoginStep(LoginStep_VideoModeSetup, "login_step_video_mode_setup")); FPU_CHECKER_ONCE