2017-02-26 20:00:24 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h"
|
|
|
|
|
|
|
|
namespace ControllerEmu
|
|
|
|
{
|
|
|
|
BooleanSetting::BooleanSetting(const std::string& setting_name, const std::string& ui_name,
|
2018-07-02 13:15:23 +00:00
|
|
|
const bool default_value, const SettingType setting_type,
|
|
|
|
const bool exclusive)
|
2017-03-03 19:08:33 +00:00
|
|
|
: m_type(setting_type), m_name(setting_name), m_ui_name(ui_name),
|
2018-07-02 13:15:23 +00:00
|
|
|
m_default_value(default_value), m_value(default_value), m_exclusive(exclusive)
|
2017-02-26 20:00:24 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
BooleanSetting::BooleanSetting(const std::string& setting_name, const bool default_value,
|
2018-07-02 13:15:23 +00:00
|
|
|
const SettingType setting_type, const bool exclusive)
|
|
|
|
: BooleanSetting(setting_name, setting_name, default_value, setting_type, exclusive)
|
2017-02-26 20:00:24 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool BooleanSetting::GetValue() const
|
|
|
|
{
|
|
|
|
return m_value;
|
|
|
|
}
|
2018-07-02 13:15:23 +00:00
|
|
|
|
|
|
|
bool BooleanSetting::IsExclusive() const
|
|
|
|
{
|
|
|
|
return m_exclusive;
|
|
|
|
}
|
|
|
|
|
2017-02-26 20:00:24 +00:00
|
|
|
void BooleanSetting::SetValue(bool value)
|
|
|
|
{
|
|
|
|
m_value = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace ControllerEmu
|