summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-22 21:40:28 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-22 21:43:49 +0100
commit226e3b83dafbff6e59b8d351441026c5a6a4bf25 (patch)
treeff214ec3d124746ae08fba9ef1128f286c89c772 /src/core/Frontend.cpp
parentfix (diff)
downloadre3-226e3b83dafbff6e59b8d351441026c5a6a4bf25.tar
re3-226e3b83dafbff6e59b8d351441026c5a6a4bf25.tar.gz
re3-226e3b83dafbff6e59b8d351441026c5a6a4bf25.tar.bz2
re3-226e3b83dafbff6e59b8d351441026c5a6a4bf25.tar.lz
re3-226e3b83dafbff6e59b8d351441026c5a6a4bf25.tar.xz
re3-226e3b83dafbff6e59b8d351441026c5a6a4bf25.tar.zst
re3-226e3b83dafbff6e59b8d351441026c5a6a4bf25.zip
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 707184d5..bd72a15f 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -3730,8 +3730,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
m_PrefsVsync = m_PrefsVsyncDisp;
@@ -3828,12 +3833,6 @@ CMenuManager::SaveSettings()
CFileMgr::SetDir("");
#else
- static bool firstTime = true;
- // In other conditions we already call SaveINIControllerSettings explicitly.
- if (firstTime) {
- SaveINIControllerSettings();
- firstTime = false;
- }
SaveINISettings();
#endif
}
@@ -5605,6 +5604,9 @@ CMenuManager::SwitchMenuOnAndOff()
#endif
ShutdownJustMenu();
SaveSettings();
+#ifdef LOAD_INI_SETTINGS
+ SaveINIControllerSettings();
+#endif
m_bStartUpFrontEndRequested = false;
pControlEdit = nil;
m_bShutDownFrontEndRequested = false;