input_common: sdl: lower vibration frequency and use it's own unique thread

This commit is contained in:
german77
2022-06-26 17:49:14 -05:00
committed by Narr the Reg
parent 01bc0c84f0
commit 5e7e55b98a
3 changed files with 12 additions and 3 deletions

View File

@ -820,11 +820,11 @@ bool Controller_NPad::VibrateControllerAtIndex(Core::HID::NpadIdType npad_id,
const auto now = steady_clock::now();
// Filter out non-zero vibrations that are within 10ms of each other.
// Filter out non-zero vibrations that are within 15ms of each other.
if ((vibration_value.low_amplitude != 0.0f || vibration_value.high_amplitude != 0.0f) &&
duration_cast<milliseconds>(
now - controller.vibration[device_index].last_vibration_timepoint) <
milliseconds(10)) {
milliseconds(15)) {
return false;
}