mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-21 18:42:38 +00:00
ControllerEmu: Split the Setting class
The Setting class was used for both numeric values and booleans, and other parts of the code had hacks to make it work with booleans. By splitting Setting into NumericSetting and BooleanSetting, it is clear which settings are numeric, and which are boolean, so there is no need to guess by checking the default values or anything like that. Also, booleans are stored as booleans in config files, instead of 1.0.
This commit is contained in:
parent
7530a2d206
commit
5e829f4527
10 changed files with 172 additions and 141 deletions
|
@ -222,9 +222,10 @@ HotkeyManager::HotkeyManager()
|
|||
}
|
||||
|
||||
groups.emplace_back(m_options = new ControlGroup(_trans("Options")));
|
||||
m_options->settings.emplace_back(
|
||||
new ControlGroup::BackgroundInputSetting(_trans("Background Input")));
|
||||
m_options->settings.emplace_back(new ControlGroup::IterateUI(_trans("Iterative Input")));
|
||||
m_options->boolean_settings.emplace_back(
|
||||
std::make_unique<ControlGroup::BackgroundInputSetting>(_trans("Background Input")));
|
||||
m_options->boolean_settings.emplace_back(std::make_unique<ControlGroup::BooleanSetting>(
|
||||
_trans("Iterative Input"), false, ControlGroup::SettingType::VIRTUAL));
|
||||
}
|
||||
|
||||
HotkeyManager::~HotkeyManager()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue