Sneak in a critical bugfix in config loading, oops. Also fix minor bug reported by oltolm.

This commit is contained in:
Henrik Rydgård committed 2025-11-05 20:29:12 +01:00
1 parent 245927b360
commit eab2cc85bc
3 files changed
+5 -4

No files matched your search

-2
View File
@@ -1186,7 +1186,6 @@ void Config::ReadAllSettings(const IniFile &iniFile) {
// Not found? Try the fallback (to upgrade settings that have been moved from old sections).
if (!section && !meta.fallbackSectionName.empty()) {
section = iniFile.GetSection(meta.fallbackSectionName);
configBlock = GetConfigBlockForSection(meta.fallbackSectionName);
}
// If section is still null, we'll handle that gracefully by resetting to defaults.
_dbg_assert_(configBlock);
@@ -1726,7 +1725,6 @@ bool Config::LoadGameConfig(const std::string &gameId) {
// Not found? Try the fallback (to upgrade settings that have been moved from old sections).
if (!section && !meta.fallbackSectionName.empty()) {
section = iniFile.GetSection(meta.fallbackSectionName);
configBlock = GetConfigBlockForSection(meta.fallbackSectionName);
}
for (size_t j = 0; j < meta.settingsCount; j++) {
meta.settings[j].ReadFromIniSection(configBlock, section, false);
+2
View File
@@ -106,6 +106,8 @@ public:
Config();
~Config();
u32 sentinel = 13371337; // For memory corruption debugging, just set a data breakpoint.
// Whether to save the config on close.
bool bSaveSettings;
bool bFirstRun;
+3 -2
View File
@@ -274,10 +274,11 @@ void DisplayLayoutScreen::CreateViews() {
supportsInsets = true;
#endif
// Hide insets option if no insets, or OS too old.
if (supportsInsets && System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_LEFT) != 0.0f ||
if (supportsInsets &&
(System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_LEFT) != 0.0f ||
System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_TOP) != 0.0f ||
System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_RIGHT) != 0.0f ||
System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_BOTTOM) != 0.0f) {
System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_BOTTOM) != 0.0f)) {
rightColumn->Add(new CheckBox(&config.bIgnoreScreenInsets, gr->T("Ignore camera notch when centering")));
}