Fixed: Wrong resolution saved to config when window receives wm_destroy signal

--HG--
branch : develop
This commit is contained in:
Nimetu 2018-07-26 20:24:17 +03:00
parent adb3362b44
commit a2707f93f1
3 changed files with 7 additions and 4 deletions

View file

@ -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 ();

View file

@ -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);

View file

@ -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