mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-14 05:58:07 -05:00
configure_input: Add per-player vibration
Allows for enabling and modifying vibration and vibration strength per player. Also adds a toggle for enabling/disabling accurate vibrations. Co-authored-by: Its-Rei <kupfel@gmail.com>
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "ui_controller.h"
|
||||
#include "yuzu/applets/controller.h"
|
||||
#include "yuzu/configuration/configure_input_dialog.h"
|
||||
#include "yuzu/configuration/configure_vibration.h"
|
||||
#include "yuzu/main.h"
|
||||
|
||||
namespace {
|
||||
@ -223,6 +224,9 @@ QtControllerSelectorDialog::QtControllerSelectorDialog(
|
||||
}
|
||||
}
|
||||
|
||||
connect(ui->vibrationButton, &QPushButton::clicked, this,
|
||||
&QtControllerSelectorDialog::CallConfigureVibrationDialog);
|
||||
|
||||
connect(ui->inputConfigButton, &QPushButton::clicked, this,
|
||||
&QtControllerSelectorDialog::CallConfigureInputDialog);
|
||||
|
||||
@ -285,6 +289,18 @@ void QtControllerSelectorDialog::LoadConfiguration() {
|
||||
ui->motionGroup->setChecked(Settings::values.motion_enabled.GetValue());
|
||||
}
|
||||
|
||||
void QtControllerSelectorDialog::CallConfigureVibrationDialog() {
|
||||
ConfigureVibration dialog(this);
|
||||
|
||||
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
|
||||
Qt::WindowSystemMenuHint);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted) {
|
||||
dialog.ApplyConfiguration();
|
||||
}
|
||||
}
|
||||
|
||||
void QtControllerSelectorDialog::CallConfigureInputDialog() {
|
||||
const auto max_supported_players = parameters.enable_single_mode ? 1 : parameters.max_players;
|
||||
|
||||
|
Reference in New Issue
Block a user