diff --git a/src/core/core.cpp b/src/core/core.cpp index f313bd6cd..29a441c00 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -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)