From a04956989a51a88f5cc1bd3476d09cdd8500cc25 Mon Sep 17 00:00:00 2001 From: nimetu Date: Tue, 22 Mar 2022 15:13:50 +0200 Subject: [PATCH] Client should only use setWindowPos in windowed mode --- ryzom/client/src/init.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/ryzom/client/src/init.cpp b/ryzom/client/src/init.cpp index c9cf7231a..11174b99a 100644 --- a/ryzom/client/src/init.cpp +++ b/ryzom/client/src/init.cpp @@ -1237,27 +1237,9 @@ void prelogInit() Driver->setWindowIcon(bitmaps); #endif - sint32 posX = 0, posY = 0; - + // use position saved in config if (ClientCfg.Windowed) - { - // use position saved in config - posX = ClientCfg.PositionX; - posY = ClientCfg.PositionY; - } - else - { - // position is not saved in config so center the window - UDriver::CMode tmp; - if (Driver->getCurrentScreenMode(tmp)) - { - posX = (tmp.Width - Driver->getWindowWidth())/2; - posY = (tmp.Height - Driver->getWindowHeight())/2; - } - } - - // Set the window position - Driver->setWindowPos(posX, posY); + Driver->setWindowPos(ClientCfg.PositionX, ClientCfg.PositionY); // Show the window Driver->showWindow();