From a2707f93f1e81d01d7135201c259fc4bb8e47dbb Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 26 Jul 2018 20:24:17 +0300 Subject: [PATCH] Fixed: Wrong resolution saved to config when window receives wm_destroy signal --HG-- branch : develop --- code/ryzom/client/src/main_loop.cpp | 4 ++++ code/ryzom/client/src/release.cpp | 4 +--- code/ryzom/client/src/release.h | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index fe96d4da3..4657f1dff 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -80,6 +80,7 @@ #include "world_database_manager.h" #include "continent_manager.h" #include "ig_callback.h" +#include "release.h" //#include "fog_map.h" #include "movie_shooter.h" #include "sound_manager.h" @@ -2555,6 +2556,9 @@ bool mainLoop() if ( ! FarTP.isReselectingChar() ) // skip some parts if the user wants to quit in the middle of a char reselect { + // Saving ingame resolution when in windowed mode + saveIngameResolution(); + // Release the structure for the ping. Ping.release (); diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index ff569b22a..d5c16bf47 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -136,7 +136,7 @@ extern void selectTipsOfTheDay (uint tips); // *************************************************************************** // Saving ingame resolution when in windowed mode -static void saveIngameResolution() +void saveIngameResolution() { if (ClientCfg.Windowed) { @@ -382,8 +382,6 @@ void releaseMainLoop(bool closeConnection) { ProgressBar.release(); - saveIngameResolution(); - // Release R2 editor if applicable R2::getEditor().autoConfigRelease(IsInRingSession); diff --git a/code/ryzom/client/src/release.h b/code/ryzom/client/src/release.h index 02eae2fa7..56ceca73d 100644 --- a/code/ryzom/client/src/release.h +++ b/code/ryzom/client/src/release.h @@ -22,7 +22,8 @@ #include "nel/misc/types_nl.h" - +// Saving ingame resolution when in windowed mode +void saveIngameResolution(); // called from farTP at reselection void releaseMainLoopReselect(); // Release InGame Data