mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-07-02 22:17:53 -05:00
configure_input: Hook up the vibration percentage spinbox
This allows setting the vibration strength percentage anywhere from 1% to 100%. Also hooks up the remaining motion button and checkbox in the Controller Applet.
This commit is contained in:
@ -493,6 +493,8 @@ void Config::ReadControlValues() {
|
||||
ReadSettingGlobal(Settings::values.use_docked_mode, QStringLiteral("use_docked_mode"), false);
|
||||
ReadSettingGlobal(Settings::values.vibration_enabled, QStringLiteral("vibration_enabled"),
|
||||
true);
|
||||
ReadSettingGlobal(Settings::values.vibration_strength, QStringLiteral("vibration_strength"),
|
||||
100);
|
||||
ReadSettingGlobal(Settings::values.motion_enabled, QStringLiteral("motion_enabled"), true);
|
||||
|
||||
qt_config->endGroup();
|
||||
@ -1150,6 +1152,8 @@ void Config::SaveControlValues() {
|
||||
WriteSettingGlobal(QStringLiteral("use_docked_mode"), Settings::values.use_docked_mode, false);
|
||||
WriteSettingGlobal(QStringLiteral("vibration_enabled"), Settings::values.vibration_enabled,
|
||||
true);
|
||||
WriteSettingGlobal(QStringLiteral("vibration_strength"), Settings::values.vibration_strength,
|
||||
100);
|
||||
WriteSettingGlobal(QStringLiteral("motion_enabled"), Settings::values.motion_enabled, true);
|
||||
WriteSetting(QStringLiteral("motion_device"),
|
||||
QString::fromStdString(Settings::values.motion_device),
|
||||
|
@ -186,6 +186,7 @@ void ConfigureInput::ApplyConfiguration() {
|
||||
OnDockedModeChanged(pre_docked_mode, Settings::values.use_docked_mode.GetValue());
|
||||
|
||||
Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked());
|
||||
Settings::values.vibration_strength.SetValue(ui->vibrationSpin->value());
|
||||
Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked());
|
||||
}
|
||||
|
||||
@ -206,6 +207,7 @@ void ConfigureInput::LoadConfiguration() {
|
||||
UpdateDockedState(Settings::values.players.GetValue()[8].connected);
|
||||
|
||||
ui->vibrationGroup->setChecked(Settings::values.vibration_enabled.GetValue());
|
||||
ui->vibrationSpin->setValue(Settings::values.vibration_strength.GetValue());
|
||||
ui->motionGroup->setChecked(Settings::values.motion_enabled.GetValue());
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>200</number>
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
|
Reference in New Issue
Block a user