[Project64] Delete default setting if application and bool

This commit is contained in:
zilmar 2016-12-13 06:20:54 +11:00
parent da2804e831
commit f8e49dfbb8
1 changed files with 10 additions and 1 deletions

View File

@ -246,7 +246,16 @@ void CSettingTypeApplication::LoadDefault(int /*Index*/, stdstr & Value) const
//Update the settings
void CSettingTypeApplication::Save(int /*Index*/, bool Value)
{
m_SettingsIniFile->SaveNumber(SectionName(), m_KeyNameIdex.c_str(), Value);
if (m_DefaultSetting != Default_None &&
((m_DefaultSetting == Default_Constant && (bool)m_DefaultValue == Value) ||
(m_DefaultSetting != Default_Constant && g_Settings->LoadDword(m_DefaultSetting) == Value)))
{
m_SettingsIniFile->SaveString(SectionName(), m_KeyNameIdex.c_str(), NULL);
}
else
{
m_SettingsIniFile->SaveNumber(SectionName(), m_KeyNameIdex.c_str(), Value);
}
}
void CSettingTypeApplication::Save(int /*Index*/, uint32_t Value)