Skip to content
Permalink
Browse files

Merge pull request #8041 from jordan-woyak/uninit-setting-value-fix

InputCommon: Make sure setting values are initialized.
  • Loading branch information...
lioncash committed Apr 27, 2019
2 parents 664cfb2 + 9f0dc40 commit 6fec0315ae9d848037bd7e32a4d229b1fbfabef9
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 6fec031

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