[Project64] Fix bug in CSettingTypeRomDatabase::Load and some code clean up

This commit is contained in:
zilmar 2018-11-26 23:03:27 +10:30
parent bac6023a5c
commit 5f39f3d122
3 changed files with 20 additions and 20 deletions

View File

@ -1,4 +1,4 @@
[default]
[Settings]
7zipCache=..\..\Config\Project64.zcache
AudioRDB=..\..\Config\Audio.rdb
Auto Sleep=0

View File

@ -25,32 +25,32 @@ CSettingTypeApplication::CSettingTypeApplication(const char * Section, const cha
}
CSettingTypeApplication::CSettingTypeApplication(const char * Section, const char * Name, bool DefaultValue) :
m_DefaultStr(""),
m_DefaultValue(DefaultValue),
m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
m_DefaultStr(""),
m_DefaultValue(DefaultValue),
m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
{
}
CSettingTypeApplication::CSettingTypeApplication(const char * Section, const char * Name, const char * DefaultValue) :
m_DefaultStr(DefaultValue),
m_DefaultValue(0),
m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
m_DefaultStr(DefaultValue),
m_DefaultValue(0),
m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
{
}
CSettingTypeApplication::CSettingTypeApplication(const char * Section, const char * Name, SettingID DefaultSetting) :
m_DefaultStr(""),
m_DefaultValue(0),
m_DefaultSetting(DefaultSetting),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
m_DefaultStr(""),
m_DefaultValue(0),
m_DefaultSetting(DefaultSetting),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
{
}

View File

@ -159,7 +159,7 @@ bool CSettingTypeRomDatabase::Load(uint32_t Index, bool & Value) const
if (Load(temp_value))
{
Value = temp_value != 0;
true;
return true;
}
LoadDefault(Index, Value);
return false;