From 6bfc777496fe5506575d516c3c55e49322504b3c Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 14 Jul 2016 20:20:55 +0300 Subject: [PATCH] Fixed: Restore scaled interface from icfg --HG-- branch : experimental-ui-scaling --- code/ryzom/client/src/interface_v3/interface_manager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 802f98c70..c75d880b6 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1787,8 +1787,12 @@ bool CInterfaceManager::loadConfig (const string &filename) CWidgetManager::getInstance()->setScreenWH(_LastInGameScreenW, _LastInGameScreenH); // NB: we are typically InGame here (even though the _InGame flag is not yet set) // Use the screen size of the config file. Don't update current UI, just _Modes - CWidgetManager::getInstance()->moveAllWindowsToNewScreenSize(ClientCfg.Width, ClientCfg.Height, false); - updateDesktops( ClientCfg.Width, ClientCfg.Height ); + // + // ClientCfg has W/H set to screen size, but interface expects scaled size + sint32 scaledW = ClientCfg.Width / ClientCfg.InterfaceScale; + sint32 scaledH = ClientCfg.Height / ClientCfg.InterfaceScale; + CWidgetManager::getInstance()->moveAllWindowsToNewScreenSize(scaledW, scaledH, false); + updateDesktops(scaledW, scaledH); } // *** apply the current mode