diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-22 21:40:28 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-23 14:18:19 +0100 |
commit | 1b3284042446551f6ff5a2c723957056131f5f31 (patch) | |
tree | 7ea98fd4aa5eb80ef24185f4ec3df373ee91f83d /src/core/Frontend.cpp | |
parent | Migrate from old .ini to new .ini (diff) | |
download | re3-1b3284042446551f6ff5a2c723957056131f5f31.tar re3-1b3284042446551f6ff5a2c723957056131f5f31.tar.gz re3-1b3284042446551f6ff5a2c723957056131f5f31.tar.bz2 re3-1b3284042446551f6ff5a2c723957056131f5f31.tar.lz re3-1b3284042446551f6ff5a2c723957056131f5f31.tar.xz re3-1b3284042446551f6ff5a2c723957056131f5f31.tar.zst re3-1b3284042446551f6ff5a2c723957056131f5f31.zip |
Diffstat (limited to 'src/core/Frontend.cpp')
-rw-r--r-- | src/core/Frontend.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 12e4b16a..0a9db5a4 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -3045,8 +3045,13 @@ CMenuManager::LoadSettings() CFileMgr::SetDir(""); #ifdef LOAD_INI_SETTINGS - LoadINISettings(); - LoadINIControllerSettings(); // Calling that after LoadINISettings is important because of gSelectedJoystickName loading + if (LoadINISettings()) { + LoadINIControllerSettings(); + } else { + // no re3.ini, create it + SaveINISettings(); + SaveINIControllerSettings(); + } #endif #ifdef FIX_BUGS @@ -3160,12 +3165,6 @@ CMenuManager::SaveSettings() #else m_lastWorking3DAudioProvider = m_nPrefsAudio3DProviderIndex; - static bool firstTime = true; - // In other conditions we already call SaveINIControllerSettings explicitly. - if (firstTime) { - SaveINIControllerSettings(); - firstTime = false; - } SaveINISettings(); #endif } @@ -5450,6 +5449,9 @@ CMenuManager::SwitchMenuOnAndOff() ThingsToDoBeforeLeavingPage(); #endif SaveSettings(); +#ifdef LOAD_INI_SETTINGS + SaveINIControllerSettings(); +#endif pControlEdit = nil; pEditString = nil; DisplayComboButtonErrMsg = false; |