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:
Filoppi
2021-02-26 01:14:00 +02:00
parent 1fe0953bd5
commit e020b2e8ea
3 changed files with 11 additions and 8 deletions

View File

@ -94,8 +94,8 @@ LayerType GetActiveLayerForConfig(const Info<T>& info)
template <typename T>
void Set(LayerType layer, const Info<T>& info, const std::common_type_t<T>& value)
{
GetLayer(layer)->Set(info, value);
OnConfigChanged();
if (GetLayer(layer)->Set(info, value))
OnConfigChanged();
}
template <typename T>