[Project64] Have temp bool setting record if it has changed
This commit is contained in:
parent
403f003372
commit
9e92381a2d
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
CSettingTypeTempBool::CSettingTypeTempBool(bool initialValue, const char * Name) :
|
CSettingTypeTempBool::CSettingTypeTempBool(bool initialValue, const char * Name) :
|
||||||
m_value(initialValue),
|
m_value(initialValue),
|
||||||
|
m_changed(false),
|
||||||
m_Name(Name ? Name : "")
|
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)
|
void CSettingTypeTempBool::Save(uint32_t /*Index*/, bool Value)
|
||||||
{
|
{
|
||||||
m_value = Value;
|
m_value = Value;
|
||||||
|
m_changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettingTypeTempBool::Save(uint32_t /*Index*/, uint32_t /*Value*/)
|
void CSettingTypeTempBool::Save(uint32_t /*Index*/, uint32_t /*Value*/)
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
|
|
||||||
bool IndexBasedSetting(void) const { return false; }
|
bool IndexBasedSetting(void) const { return false; }
|
||||||
SettingType GetSettingType(void) const { return SettingType_BoolVariable; }
|
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(); }
|
const char * GetName(void) const { return m_Name.c_str(); }
|
||||||
|
|
||||||
|
@ -50,5 +50,6 @@ private:
|
||||||
CSettingTypeTempBool& operator=(const CSettingTypeTempBool&); // Disable assignment
|
CSettingTypeTempBool& operator=(const CSettingTypeTempBool&); // Disable assignment
|
||||||
|
|
||||||
bool m_value;
|
bool m_value;
|
||||||
|
bool m_changed;
|
||||||
std::string m_Name;
|
std::string m_Name;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue