[Project64] Have temp bool setting record if it has changed

This commit is contained in:
zilmar 2018-03-28 19:35:20 +11:00
parent 403f003372
commit 9e92381a2d
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@
CSettingTypeTempBool::CSettingTypeTempBool(bool initialValue, const char * Name) :
m_value(initialValue),
m_changed(false),
m_Name(Name ? Name : "")
{
}
@ -58,6 +59,7 @@ void CSettingTypeTempBool::LoadDefault(uint32_t /*Index*/, std::string & /*Value
void CSettingTypeTempBool::Save(uint32_t /*Index*/, bool Value)
{
m_value = Value;
m_changed = true;
}
void CSettingTypeTempBool::Save(uint32_t /*Index*/, uint32_t /*Value*/)

View File

@ -21,7 +21,7 @@ public:
bool IndexBasedSetting(void) const { return false; }
SettingType GetSettingType(void) const { return SettingType_BoolVariable; }
bool IsSettingSet(void) const { return false; }
bool IsSettingSet(void) const { return m_changed; }
const char * GetName(void) const { return m_Name.c_str(); }
@ -50,5 +50,6 @@ private:
CSettingTypeTempBool& operator=(const CSettingTypeTempBool&); // Disable assignment
bool m_value;
bool m_changed;
std::string m_Name;
};