INISettingsInterface: Return bool on saving settings

This commit is contained in:
Albert Liu 2020-05-27 16:36:41 -07:00
parent b5311e5896
commit f8fea1b215
2 changed files with 8 additions and 4 deletions

View File

@ -16,13 +16,17 @@ INISettingsInterface::~INISettingsInterface()
Save();
}
void INISettingsInterface::Save()
bool INISettingsInterface::Save()
{
SI_Error err = m_ini.SaveFile(m_filename.c_str(), false);
if (err != SI_OK)
{
Log_WarningPrintf("Failed to save settings to '%s'.", m_filename.c_str());
else
m_dirty = false;
return false;
}
m_dirty = false;
return true;
}
void INISettingsInterface::Clear()

View File

@ -9,7 +9,7 @@ public:
INISettingsInterface(std::string filename);
~INISettingsInterface();
void Save();
bool Save();
void Clear() override;