mirror of
https://github.com/stenzek/duckstation.git
synced 2026-07-11 01:24:11 +02:00
Settings: Remove empty sections before saving
This commit is contained in:
+4
-3
@@ -277,10 +277,11 @@ bool Core::InitializeBaseSettingsLayer(std::string settings_path, Error* error)
|
||||
bool Core::SaveBaseSettingsLayer(Error* error)
|
||||
{
|
||||
INISettingsInterface& si = s_locals.base_settings_interface;
|
||||
if (si.IsDirty() && !si.Save(error, Settings::GetSectionSaveOrder()))
|
||||
return false;
|
||||
if (!si.IsDirty())
|
||||
return true;
|
||||
|
||||
return true;
|
||||
si.RemoveEmptySections();
|
||||
return si.Save(error, Settings::GetSectionSaveOrder());
|
||||
}
|
||||
|
||||
void Core::SetDefaultSettings(bool host, bool system, bool controller)
|
||||
|
||||
Reference in New Issue
Block a user