yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #6195 from Morph1984/controller-applet-motion

applets/controller: Hook up the "Motion" button functionality
This commit is contained in:
bunnei 2021-04-13 21:53:34 -07:00 committed by GitHub
commit 62a8505345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include "yuzu/applets/controller.h" #include "yuzu/applets/controller.h"
#include "yuzu/configuration/configure_input.h" #include "yuzu/configuration/configure_input.h"
#include "yuzu/configuration/configure_input_profile_dialog.h" #include "yuzu/configuration/configure_input_profile_dialog.h"
#include "yuzu/configuration/configure_motion_touch.h"
#include "yuzu/configuration/configure_vibration.h" #include "yuzu/configuration/configure_vibration.h"
#include "yuzu/configuration/input_profiles.h" #include "yuzu/configuration/input_profiles.h"
#include "yuzu/main.h" #include "yuzu/main.h"
@ -206,6 +207,9 @@ QtControllerSelectorDialog::QtControllerSelectorDialog(
connect(ui->vibrationButton, &QPushButton::clicked, this, connect(ui->vibrationButton, &QPushButton::clicked, this,
&QtControllerSelectorDialog::CallConfigureVibrationDialog); &QtControllerSelectorDialog::CallConfigureVibrationDialog);
connect(ui->motionButton, &QPushButton::clicked, this,
&QtControllerSelectorDialog::CallConfigureMotionTouchDialog);
connect(ui->inputConfigButton, &QPushButton::clicked, this, connect(ui->inputConfigButton, &QPushButton::clicked, this,
&QtControllerSelectorDialog::CallConfigureInputProfileDialog); &QtControllerSelectorDialog::CallConfigureInputProfileDialog);
@ -276,6 +280,18 @@ void QtControllerSelectorDialog::CallConfigureVibrationDialog() {
} }
} }
void QtControllerSelectorDialog::CallConfigureMotionTouchDialog() {
ConfigureMotionTouch dialog(this, input_subsystem);
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
Qt::WindowSystemMenuHint);
dialog.setWindowModality(Qt::WindowModal);
if (dialog.exec() == QDialog::Accepted) {
dialog.ApplyConfiguration();
}
}
void QtControllerSelectorDialog::CallConfigureInputProfileDialog() { void QtControllerSelectorDialog::CallConfigureInputProfileDialog() {
ConfigureInputProfileDialog dialog(this, input_subsystem, input_profiles.get()); ConfigureInputProfileDialog dialog(this, input_subsystem, input_profiles.get());

View File

@ -51,6 +51,9 @@ private:
// Initializes the "Configure Vibration" Dialog. // Initializes the "Configure Vibration" Dialog.
void CallConfigureVibrationDialog(); void CallConfigureVibrationDialog();
// Initializes the "Configure Motion / Touch" Dialog.
void CallConfigureMotionTouchDialog();
// Initializes the "Create Input Profile" Dialog. // Initializes the "Create Input Profile" Dialog.
void CallConfigureInputProfileDialog(); void CallConfigureInputProfileDialog();