summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Frontend.cpp')
-rw-r--r--src/core/Frontend.cpp18
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;