mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Common: don't call OnConfigChanged() unless it has actually changed
DualShock UDP Client is the only place in the code that assumed OnConfigChanged() is called at least once on startup or it won't load up the setting, so I took care of that
This commit is contained in:
@ -118,24 +118,25 @@ public:
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Set(const Info<T>& config_info, const std::common_type_t<T>& value)
|
||||
bool Set(const Info<T>& config_info, const std::common_type_t<T>& value)
|
||||
{
|
||||
Set(config_info.GetLocation(), value);
|
||||
return Set(config_info.GetLocation(), value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Set(const Location& location, const T& value)
|
||||
bool Set(const Location& location, const T& value)
|
||||
{
|
||||
Set(location, ValueToString(value));
|
||||
return Set(location, ValueToString(value));
|
||||
}
|
||||
|
||||
void Set(const Location& location, std::string new_value)
|
||||
bool Set(const Location& location, std::string new_value)
|
||||
{
|
||||
const auto iter = m_map.find(location);
|
||||
if (iter != m_map.end() && iter->second == new_value)
|
||||
return;
|
||||
return false;
|
||||
m_is_dirty = true;
|
||||
m_map.insert_or_assign(location, std::move(new_value));
|
||||
return true;
|
||||
}
|
||||
|
||||
void MarkAsDirty() { m_is_dirty = true; }
|
||||
|
Reference in New Issue
Block a user