Browse Source

settings: Remove global vibration strength modifier

This will be replaced in favor of per-player vibration strength modifiers.
Morph 5 năm trước cách đây
mục cha
commit
d6a41cfc21

+ 1 - 3
src/core/hle/service/hid/controllers/npad.cpp

@@ -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);
 }
 

+ 0 - 1
src/core/settings.cpp

@@ -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);
 }
 

+ 0 - 1
src/core/settings.h

@@ -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;

+ 0 - 2
src/yuzu/applets/controller.cpp

@@ -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());
 }
 

+ 0 - 4
src/yuzu/configuration/config.cpp

@@ -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),

+ 0 - 2
src/yuzu/configuration/configure_input.cpp

@@ -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());
 }
 

+ 0 - 2
src/yuzu_cmd/config.cpp

@@ -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 =

+ 0 - 3
src/yuzu_cmd/default_ini.h

@@ -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)

+ 0 - 1
src/yuzu_tester/config.cpp

@@ -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 = "";