settings: Remove global vibration strength modifier

This will be replaced in favor of per-player vibration strength modifiers.
This commit is contained in:
Morph 2020-10-16 11:55:45 -04:00
parent 92fa5257c7
commit d6a41cfc21
9 changed files with 1 additions and 19 deletions

View File

@ -684,9 +684,7 @@ bool Controller_NPad::VibrateControllerAtIndex(std::size_t npad_index,
const auto& button_state = buttons[npad_index];
return button_state[A - BUTTON_HID_BEGIN]->SetRumblePlay(
vibration_value.amp_low * Settings::values.vibration_strength.GetValue() / 100,
vibration_value.freq_low,
vibration_value.amp_high * Settings::values.vibration_strength.GetValue() / 100,
vibration_value.amp_low, vibration_value.freq_low, vibration_value.amp_high,
vibration_value.freq_high);
}

View File

@ -150,7 +150,6 @@ void RestoreGlobalState() {
values.players.SetGlobal(true);
values.use_docked_mode.SetGlobal(true);
values.vibration_enabled.SetGlobal(true);
values.vibration_strength.SetGlobal(true);
values.motion_enabled.SetGlobal(true);
}

View File

@ -170,7 +170,6 @@ struct Values {
Setting<bool> use_docked_mode;
Setting<bool> vibration_enabled;
Setting<int> vibration_strength;
Setting<bool> motion_enabled;
std::string motion_device;

View File

@ -266,7 +266,6 @@ void QtControllerSelectorDialog::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());
}
@ -283,7 +282,6 @@ void QtControllerSelectorDialog::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());
}

View File

@ -493,8 +493,6 @@ 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();
@ -1152,8 +1150,6 @@ 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),

View File

@ -186,7 +186,6 @@ 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());
}
@ -207,7 +206,6 @@ 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());
}

View File

@ -290,8 +290,6 @@ void Config::ReadValues() {
Settings::values.vibration_enabled.SetValue(
sdl2_config->GetBoolean("ControlsGeneral", "vibration_enabled", true));
Settings::values.vibration_strength.SetValue(
sdl2_config->GetInteger("ControlsGeneral", "vibration_strength", 100));
Settings::values.motion_enabled.SetValue(
sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true));
Settings::values.touchscreen.enabled =

View File

@ -69,9 +69,6 @@ rstick=
# 0: Disabled, 1 (default): Enabled
vibration_enabled=
# Vibration strength percentage (Default: 100)
vibration_strength=
# for motion input, the following devices are available:
# - "motion_emu" (default) for emulating motion input from mouse input. Required parameters:
# - "update_period": update period in milliseconds (default to 100)

View File

@ -76,7 +76,6 @@ void Config::ReadValues() {
}
Settings::values.vibration_enabled.SetValue(true);
Settings::values.vibration_strength.SetValue(100);
Settings::values.motion_enabled.SetValue(true);
Settings::values.touchscreen.enabled = "";
Settings::values.touchscreen.device = "";