diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-10-09 05:43:07 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-11-16 05:33:20 +0100 |
commit | 652d6766d55acec6416dccb900a45c6660a86607 (patch) | |
tree | 7f9c64b78ca02aa1f62de77e25fcacbb2fdc4291 /src/core | |
parent | controllers/npad: Stop games from vibrating incorrect controllers (diff) | |
download | yuzu-652d6766d55acec6416dccb900a45c6660a86607.tar yuzu-652d6766d55acec6416dccb900a45c6660a86607.tar.gz yuzu-652d6766d55acec6416dccb900a45c6660a86607.tar.bz2 yuzu-652d6766d55acec6416dccb900a45c6660a86607.tar.lz yuzu-652d6766d55acec6416dccb900a45c6660a86607.tar.xz yuzu-652d6766d55acec6416dccb900a45c6660a86607.tar.zst yuzu-652d6766d55acec6416dccb900a45c6660a86607.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 3 | ||||
-rw-r--r-- | src/core/settings.cpp | 1 | ||||
-rw-r--r-- | src/core/settings.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index f865e3f5f..924f209c0 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -703,7 +703,8 @@ void Controller_NPad::VibrateController(const std::vector<DeviceHandle>& vibrati // TODO: Vibrate left/right vibration motors independently if possible. button_state[A - BUTTON_HID_BEGIN]->SetRumblePlay( - vibration_values[i].amp_high, vibration_values[i].amp_low, + vibration_values[i].amp_high * Settings::values.vibration_strength.GetValue() / 100, + vibration_values[i].amp_low * Settings::values.vibration_strength.GetValue() / 100, vibration_values[i].freq_high, vibration_values[i].freq_low); latest_vibration_values[npad_index][device_index] = vibration_values[i]; diff --git a/src/core/settings.cpp b/src/core/settings.cpp index aadbc3932..6e39aebb5 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -150,6 +150,7 @@ 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); } diff --git a/src/core/settings.h b/src/core/settings.h index edd2a00ca..496f47747 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -170,6 +170,7 @@ struct Values { Setting<bool> use_docked_mode; Setting<bool> vibration_enabled; + Setting<int> vibration_strength; Setting<bool> motion_enabled; std::string motion_device; |