diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-01-21 23:44:03 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2024-01-21 23:44:31 +0100 |
commit | a7a77207529b5976574f3a427d55fe85224a1193 (patch) | |
tree | 80d1d1b9560e348fac8b14065ad098165e16c5c5 | |
parent | Merge pull request #12720 from t895/return-to-global (diff) | |
download | yuzu-a7a77207529b5976574f3a427d55fe85224a1193.tar yuzu-a7a77207529b5976574f3a427d55fe85224a1193.tar.gz yuzu-a7a77207529b5976574f3a427d55fe85224a1193.tar.bz2 yuzu-a7a77207529b5976574f3a427d55fe85224a1193.tar.lz yuzu-a7a77207529b5976574f3a427d55fe85224a1193.tar.xz yuzu-a7a77207529b5976574f3a427d55fe85224a1193.tar.zst yuzu-a7a77207529b5976574f3a427d55fe85224a1193.zip |
-rw-r--r-- | src/hid_core/frontend/emulated_controller.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hid_core/frontend/emulated_controller.cpp b/src/hid_core/frontend/emulated_controller.cpp index f2499502d..e12e5a77e 100644 --- a/src/hid_core/frontend/emulated_controller.cpp +++ b/src/hid_core/frontend/emulated_controller.cpp @@ -1240,12 +1240,17 @@ bool EmulatedController::SetVibration(DeviceIndex device_index, const VibrationV if (!output_devices[index]) { return false; } + + last_vibration_value = vibration; + + if (!Settings::values.vibration_enabled) { + return false; + } + const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type); const auto& player = Settings::values.players.GetValue()[player_index]; const f32 strength = static_cast<f32>(player.vibration_strength) / 100.0f; - last_vibration_value = vibration; - if (!player.vibration_enabled) { return false; } |