diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-06-28 15:58:16 -0400 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-06-28 17:32:17 -0400 |
commit | b91b76df4fe27d781bd95ddb89b78ff54df57029 (patch) | |
tree | abd3de5c02b036ec936a70599e496ba1d45d7849 /src/yuzu/configuration/configure_motion_touch.cpp | |
parent | 35b17fa5e0a69c019852fed9ede9b64f08dd21a0 (diff) |
general: Make most settings a BasicSetting
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.
Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
Diffstat (limited to 'src/yuzu/configuration/configure_motion_touch.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_motion_touch.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/yuzu/configuration/configure_motion_touch.cpp b/src/yuzu/configuration/configure_motion_touch.cpp index 6a5d625df..f8e08c422 100644 --- a/src/yuzu/configuration/configure_motion_touch.cpp +++ b/src/yuzu/configuration/configure_motion_touch.cpp @@ -101,15 +101,16 @@ ConfigureMotionTouch::ConfigureMotionTouch(QWidget* parent, ConfigureMotionTouch::~ConfigureMotionTouch() = default; void ConfigureMotionTouch::SetConfiguration() { - const Common::ParamPackage motion_param(Settings::values.motion_device); - const Common::ParamPackage touch_param(Settings::values.touch_device); + const Common::ParamPackage motion_param(Settings::values.motion_device.GetValue()); + const Common::ParamPackage touch_param(Settings::values.touch_device.GetValue()); - ui->touch_from_button_checkbox->setChecked(Settings::values.use_touch_from_button); + ui->touch_from_button_checkbox->setChecked(Settings::values.use_touch_from_button.GetValue()); touch_from_button_maps = Settings::values.touch_from_button_maps; for (const auto& touch_map : touch_from_button_maps) { ui->touch_from_button_map->addItem(QString::fromStdString(touch_map.name)); } - ui->touch_from_button_map->setCurrentIndex(Settings::values.touch_from_button_map_index); + ui->touch_from_button_map->setCurrentIndex( + Settings::values.touch_from_button_map_index.GetValue()); ui->motion_sensitivity->setValue(motion_param.Get("sensitivity", 0.01f)); min_x = touch_param.Get("min_x", 100); @@ -124,7 +125,7 @@ void ConfigureMotionTouch::SetConfiguration() { udp_server_list_model->setStringList({}); ui->udp_server_list->setModel(udp_server_list_model); - std::stringstream ss(Settings::values.udp_input_servers); + std::stringstream ss(Settings::values.udp_input_servers.GetValue()); std::string token; while (std::getline(ss, token, ',')) { |