Merge pull request #5006 from lioncash/settings

ControllerEmu: Initialize settings class' values to default values on construction
This commit is contained in:
Markus Wick 2017-03-04 12:13:24 +01:00 committed by GitHub
commit 01143d761e
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,8 @@ namespace ControllerEmu
{ {
BooleanSetting::BooleanSetting(const std::string& setting_name, const std::string& ui_name, BooleanSetting::BooleanSetting(const std::string& setting_name, const std::string& ui_name,
const bool default_value, const SettingType setting_type) const bool default_value, const SettingType setting_type)
: m_type(setting_type), m_name(setting_name), m_ui_name(ui_name), m_default_value(default_value) : m_type(setting_type), m_name(setting_name), m_ui_name(ui_name),
m_default_value(default_value), m_value(default_value)
{ {
} }

View File

@ -9,7 +9,7 @@ namespace ControllerEmu
NumericSetting::NumericSetting(const std::string& setting_name, const ControlState default_value, NumericSetting::NumericSetting(const std::string& setting_name, const ControlState default_value,
const u32 low, const u32 high, const SettingType setting_type) const u32 low, const u32 high, const SettingType setting_type)
: m_type(setting_type), m_name(setting_name), m_default_value(default_value), m_low(low), : m_type(setting_type), m_name(setting_name), m_default_value(default_value), m_low(low),
m_high(high) m_high(high), m_value(default_value)
{ {
} }