mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-09-04 22:49:00 +00:00
core: hid: Allow to disable vibration
This commit is contained in:
parent
93a3342841
commit
a7a7720752
@ -1240,12 +1240,17 @@ bool EmulatedController::SetVibration(DeviceIndex device_index, const VibrationV
|
|||||||
if (!output_devices[index]) {
|
if (!output_devices[index]) {
|
||||||
return false;
|
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_index = Service::HID::NpadIdTypeToIndex(npad_id_type);
|
||||||
const auto& player = Settings::values.players.GetValue()[player_index];
|
const auto& player = Settings::values.players.GetValue()[player_index];
|
||||||
const f32 strength = static_cast<f32>(player.vibration_strength) / 100.0f;
|
const f32 strength = static_cast<f32>(player.vibration_strength) / 100.0f;
|
||||||
|
|
||||||
last_vibration_value = vibration;
|
|
||||||
|
|
||||||
if (!player.vibration_enabled) {
|
if (!player.vibration_enabled) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user