diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-09-05 09:42:01 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-09-05 09:46:34 -0400 |
commit | 5b6268d26a178f8104c7075daf24df37147a202b (patch) | |
tree | a869445ef861705679cfba39fdfabf418e2ccf80 /src/yuzu/configuration/configure_input.cpp | |
parent | 797564599f98d7d1f7a190c3c72f8341d8265d58 (diff) |
configure_input: Hook up the motion button and checkbox
This allows toggling motion on or off, and allows access to the motion configuration.
Also changes the [waiting] text for motion buttons to Shake! as this is how motion is connected to a player.
Diffstat (limited to 'src/yuzu/configuration/configure_input.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_input.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index ae3e31762..1c54355d1 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp @@ -133,6 +133,10 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem) { CallConfigureDialog<ConfigureMotionTouch>(*this, input_subsystem); }); + connect(ui->motionButton, &QPushButton::clicked, [this, input_subsystem] { + CallConfigureDialog<ConfigureMotionTouch>(*this, input_subsystem); + }); + connect(ui->buttonClearAll, &QPushButton::clicked, [this] { ClearAll(); }); connect(ui->buttonRestoreDefaults, &QPushButton::clicked, [this] { RestoreDefaults(); }); @@ -159,6 +163,7 @@ void ConfigureInput::ApplyConfiguration() { OnDockedModeChanged(pre_docked_mode, Settings::values.use_docked_mode); Settings::values.vibration_enabled = ui->vibrationGroup->isChecked(); + Settings::values.motion_enabled = ui->motionGroup->isChecked(); } void ConfigureInput::changeEvent(QEvent* event) { @@ -179,6 +184,7 @@ void ConfigureInput::LoadConfiguration() { Settings::ControllerType::Handheld); ui->vibrationGroup->setChecked(Settings::values.vibration_enabled); + ui->motionGroup->setChecked(Settings::values.motion_enabled); } void ConfigureInput::LoadPlayerControllerIndices() { @@ -205,6 +211,7 @@ void ConfigureInput::RestoreDefaults() { ui->radioDocked->setChecked(true); ui->radioUndocked->setChecked(false); ui->vibrationGroup->setChecked(true); + ui->motionGroup->setChecked(true); } void ConfigureInput::UpdateDockedState(bool is_handheld) { |