summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2019-04-27 08:35:50 -0400
committerGitHub <noreply@github.com>2019-04-27 08:35:50 -0400
commit6fec0315ae9d848037bd7e32a4d229b1fbfabef9 (patch)
tree9c4fc632029473295688d3e819f937edadc9f9a0 /Source/Core/InputCommon/ControllerEmu
parent664cfb2ca5e55f0c8969966a98bfedeeed268213 (diff)
parent9f0dc402f44c56de848a295cf8720792f02aa79f (diff)
Merge pull request #8041 from jordan-woyak/uninit-setting-value-fix
InputCommon: Make sure setting values are initialized.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h b/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h
index ccc46634ed..108b228049 100644
--- a/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h
+++ b/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h
@@ -79,6 +79,7 @@ public:
: 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 @@ private:
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