settings: Remove global vibration strength modifier
This will be replaced in favor of per-player vibration strength modifiers.
This commit is contained in:
parent
92fa5257c7
commit
d6a41cfc21
|
@ -684,9 +684,7 @@ bool Controller_NPad::VibrateControllerAtIndex(std::size_t npad_index,
|
||||||
const auto& button_state = buttons[npad_index];
|
const auto& button_state = buttons[npad_index];
|
||||||
|
|
||||||
return button_state[A - BUTTON_HID_BEGIN]->SetRumblePlay(
|
return button_state[A - BUTTON_HID_BEGIN]->SetRumblePlay(
|
||||||
vibration_value.amp_low * Settings::values.vibration_strength.GetValue() / 100,
|
vibration_value.amp_low, vibration_value.freq_low, vibration_value.amp_high,
|
||||||
vibration_value.freq_low,
|
|
||||||
vibration_value.amp_high * Settings::values.vibration_strength.GetValue() / 100,
|
|
||||||
vibration_value.freq_high);
|
vibration_value.freq_high);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,6 @@ void RestoreGlobalState() {
|
||||||
values.players.SetGlobal(true);
|
values.players.SetGlobal(true);
|
||||||
values.use_docked_mode.SetGlobal(true);
|
values.use_docked_mode.SetGlobal(true);
|
||||||
values.vibration_enabled.SetGlobal(true);
|
values.vibration_enabled.SetGlobal(true);
|
||||||
values.vibration_strength.SetGlobal(true);
|
|
||||||
values.motion_enabled.SetGlobal(true);
|
values.motion_enabled.SetGlobal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,6 @@ struct Values {
|
||||||
Setting<bool> use_docked_mode;
|
Setting<bool> use_docked_mode;
|
||||||
|
|
||||||
Setting<bool> vibration_enabled;
|
Setting<bool> vibration_enabled;
|
||||||
Setting<int> vibration_strength;
|
|
||||||
|
|
||||||
Setting<bool> motion_enabled;
|
Setting<bool> motion_enabled;
|
||||||
std::string motion_device;
|
std::string motion_device;
|
||||||
|
|
|
@ -266,7 +266,6 @@ void QtControllerSelectorDialog::ApplyConfiguration() {
|
||||||
OnDockedModeChanged(pre_docked_mode, Settings::values.use_docked_mode.GetValue());
|
OnDockedModeChanged(pre_docked_mode, Settings::values.use_docked_mode.GetValue());
|
||||||
|
|
||||||
Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked());
|
Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked());
|
||||||
Settings::values.vibration_strength.SetValue(ui->vibrationSpin->value());
|
|
||||||
Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked());
|
Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,7 +282,6 @@ void QtControllerSelectorDialog::LoadConfiguration() {
|
||||||
UpdateDockedState(Settings::values.players.GetValue()[8].connected);
|
UpdateDockedState(Settings::values.players.GetValue()[8].connected);
|
||||||
|
|
||||||
ui->vibrationGroup->setChecked(Settings::values.vibration_enabled.GetValue());
|
ui->vibrationGroup->setChecked(Settings::values.vibration_enabled.GetValue());
|
||||||
ui->vibrationSpin->setValue(Settings::values.vibration_strength.GetValue());
|
|
||||||
ui->motionGroup->setChecked(Settings::values.motion_enabled.GetValue());
|
ui->motionGroup->setChecked(Settings::values.motion_enabled.GetValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -493,8 +493,6 @@ void Config::ReadControlValues() {
|
||||||
ReadSettingGlobal(Settings::values.use_docked_mode, QStringLiteral("use_docked_mode"), false);
|
ReadSettingGlobal(Settings::values.use_docked_mode, QStringLiteral("use_docked_mode"), false);
|
||||||
ReadSettingGlobal(Settings::values.vibration_enabled, QStringLiteral("vibration_enabled"),
|
ReadSettingGlobal(Settings::values.vibration_enabled, QStringLiteral("vibration_enabled"),
|
||||||
true);
|
true);
|
||||||
ReadSettingGlobal(Settings::values.vibration_strength, QStringLiteral("vibration_strength"),
|
|
||||||
100);
|
|
||||||
ReadSettingGlobal(Settings::values.motion_enabled, QStringLiteral("motion_enabled"), true);
|
ReadSettingGlobal(Settings::values.motion_enabled, QStringLiteral("motion_enabled"), true);
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
@ -1152,8 +1150,6 @@ void Config::SaveControlValues() {
|
||||||
WriteSettingGlobal(QStringLiteral("use_docked_mode"), Settings::values.use_docked_mode, false);
|
WriteSettingGlobal(QStringLiteral("use_docked_mode"), Settings::values.use_docked_mode, false);
|
||||||
WriteSettingGlobal(QStringLiteral("vibration_enabled"), Settings::values.vibration_enabled,
|
WriteSettingGlobal(QStringLiteral("vibration_enabled"), Settings::values.vibration_enabled,
|
||||||
true);
|
true);
|
||||||
WriteSettingGlobal(QStringLiteral("vibration_strength"), Settings::values.vibration_strength,
|
|
||||||
100);
|
|
||||||
WriteSettingGlobal(QStringLiteral("motion_enabled"), Settings::values.motion_enabled, true);
|
WriteSettingGlobal(QStringLiteral("motion_enabled"), Settings::values.motion_enabled, true);
|
||||||
WriteSetting(QStringLiteral("motion_device"),
|
WriteSetting(QStringLiteral("motion_device"),
|
||||||
QString::fromStdString(Settings::values.motion_device),
|
QString::fromStdString(Settings::values.motion_device),
|
||||||
|
|
|
@ -186,7 +186,6 @@ void ConfigureInput::ApplyConfiguration() {
|
||||||
OnDockedModeChanged(pre_docked_mode, Settings::values.use_docked_mode.GetValue());
|
OnDockedModeChanged(pre_docked_mode, Settings::values.use_docked_mode.GetValue());
|
||||||
|
|
||||||
Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked());
|
Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked());
|
||||||
Settings::values.vibration_strength.SetValue(ui->vibrationSpin->value());
|
|
||||||
Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked());
|
Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +206,6 @@ void ConfigureInput::LoadConfiguration() {
|
||||||
UpdateDockedState(Settings::values.players.GetValue()[8].connected);
|
UpdateDockedState(Settings::values.players.GetValue()[8].connected);
|
||||||
|
|
||||||
ui->vibrationGroup->setChecked(Settings::values.vibration_enabled.GetValue());
|
ui->vibrationGroup->setChecked(Settings::values.vibration_enabled.GetValue());
|
||||||
ui->vibrationSpin->setValue(Settings::values.vibration_strength.GetValue());
|
|
||||||
ui->motionGroup->setChecked(Settings::values.motion_enabled.GetValue());
|
ui->motionGroup->setChecked(Settings::values.motion_enabled.GetValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -290,8 +290,6 @@ void Config::ReadValues() {
|
||||||
|
|
||||||
Settings::values.vibration_enabled.SetValue(
|
Settings::values.vibration_enabled.SetValue(
|
||||||
sdl2_config->GetBoolean("ControlsGeneral", "vibration_enabled", true));
|
sdl2_config->GetBoolean("ControlsGeneral", "vibration_enabled", true));
|
||||||
Settings::values.vibration_strength.SetValue(
|
|
||||||
sdl2_config->GetInteger("ControlsGeneral", "vibration_strength", 100));
|
|
||||||
Settings::values.motion_enabled.SetValue(
|
Settings::values.motion_enabled.SetValue(
|
||||||
sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true));
|
sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true));
|
||||||
Settings::values.touchscreen.enabled =
|
Settings::values.touchscreen.enabled =
|
||||||
|
|
|
@ -69,9 +69,6 @@ rstick=
|
||||||
# 0: Disabled, 1 (default): Enabled
|
# 0: Disabled, 1 (default): Enabled
|
||||||
vibration_enabled=
|
vibration_enabled=
|
||||||
|
|
||||||
# Vibration strength percentage (Default: 100)
|
|
||||||
vibration_strength=
|
|
||||||
|
|
||||||
# for motion input, the following devices are available:
|
# for motion input, the following devices are available:
|
||||||
# - "motion_emu" (default) for emulating motion input from mouse input. Required parameters:
|
# - "motion_emu" (default) for emulating motion input from mouse input. Required parameters:
|
||||||
# - "update_period": update period in milliseconds (default to 100)
|
# - "update_period": update period in milliseconds (default to 100)
|
||||||
|
|
|
@ -76,7 +76,6 @@ void Config::ReadValues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::values.vibration_enabled.SetValue(true);
|
Settings::values.vibration_enabled.SetValue(true);
|
||||||
Settings::values.vibration_strength.SetValue(100);
|
|
||||||
Settings::values.motion_enabled.SetValue(true);
|
Settings::values.motion_enabled.SetValue(true);
|
||||||
Settings::values.touchscreen.enabled = "";
|
Settings::values.touchscreen.enabled = "";
|
||||||
Settings::values.touchscreen.device = "";
|
Settings::values.touchscreen.device = "";
|
||||||
|
|
Loading…
Reference in New Issue