summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-23 14:04:19 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-23 14:04:19 +0100
commit45c2488e367dad03726df94cf885c5655d6e47ab (patch)
tree67c021812dbd10309f2e28d633566acfde2709d1 /src/core
parentStore all settings in .INI (diff)
downloadre3-45c2488e367dad03726df94cf885c5655d6e47ab.tar
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.gz
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.bz2
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.lz
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.xz
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.zst
re3-45c2488e367dad03726df94cf885c5655d6e47ab.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/re3.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 8ec1bd01..3d94cafd 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -439,6 +439,7 @@ void LoadINISettings()
#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
+ bool migrate = cfg.category_size("FrontendOptions") != 0;
for (int i = 0; i < MENUPAGES; i++) {
for (int j = 0; j < NUM_MENUROWS; j++) {
CMenuScreenCustom::CMenuEntry &option = aScreens[i].m_aEntries[j];
@@ -448,7 +449,13 @@ void LoadINISettings()
// CFO check
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
// CFO only supports saving uint8 right now
- ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, option.m_CFO->value);
+
+ // Migrate from old .ini to new .ini
+ if (migrate && ReadIniIfExists("FrontendOptions", option.m_CFO->save, option.m_CFO->value))
+ cfg.remove("FrontendOptions", option.m_CFO->save);
+ else
+ ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, option.m_CFO->value);
+
if (option.m_Action == MENUACTION_CFO_SELECT) {
option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue = *option.m_CFO->value;
}