Skip to content
Permalink
Browse files

InputCommon: Make sure setting values are initialized in case they ar…

…e used before config load.
  • Loading branch information...
jordan-woyak committed Apr 27, 2019
1 parent 664cfb2 commit 9f0dc402f44c56de848a295cf8720792f02aa79f
Showing with 2 additions and 1 deletion.
  1. +2 −1 Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h
@@ -79,6 +79,7 @@ class NumericSetting : public NumericSettingBase
: NumericSettingBase(details), m_value(*value), m_default_value(default_value),
m_min_value(min_value), m_max_value(max_value)
{
m_value.SetValue(m_default_value);
}

void LoadFromIni(const IniFile::Section& section, const std::string& group_name) override
@@ -124,7 +125,7 @@ class SettingValue
void SetValue(ValueType value) { m_value = value; }

// Values are R/W by both UI and CPU threads.
std::atomic<ValueType> m_value;
std::atomic<ValueType> m_value = {};
};

} // namespace ControllerEmu

0 comments on commit 9f0dc40

Please sign in to comment.
You can’t perform that action at this time.