From dafca1e264554a8cea9a79fc394ca6e85f4f11e9 Mon Sep 17 00:00:00 2001 From: badfontkeming <107527585+badfontkeming@users.noreply.github.com> Date: Sat, 12 Oct 2024 02:15:37 -0500 Subject: [PATCH] USB: Work around FFB dropouts with modern wheels Certain modern direct-drive wheels such as the Moza R5, R9, etc. implement timeouts for FFB constant forces, and expect the forces to be re-run rather than updated in order to refresh these timeouts. --- pcsx2/USB/usb-pad/usb-pad-sdl-ff.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pcsx2/USB/usb-pad/usb-pad-sdl-ff.cpp b/pcsx2/USB/usb-pad/usb-pad-sdl-ff.cpp index cb624eeb3c..529d8a7af5 100644 --- a/pcsx2/USB/usb-pad/usb-pad-sdl-ff.cpp +++ b/pcsx2/USB/usb-pad/usb-pad-sdl-ff.cpp @@ -187,13 +187,13 @@ namespace usb_pad Console.Warning("SDL_HapticUpdateEffect() for constant failed: %s", SDL_GetError()); } - if (!m_constant_effect_running) - { - if (SDL_HapticRunEffect(m_haptic, m_constant_effect_id, SDL_HAPTIC_INFINITY) == 0) - m_constant_effect_running = true; - else - Console.Error("SDL_HapticRunEffect() for constant failed: %s", SDL_GetError()); - } + // Always 'run' the constant force effect, even when already running. This + // mitigates FFB timeout issues experienced by some modern direct-drive + // wheels, such as Moza R5, R9, etc... + if (SDL_HapticRunEffect(m_haptic, m_constant_effect_id, SDL_HAPTIC_INFINITY) == 0) + m_constant_effect_running = true; + else + Console.Error("SDL_HapticRunEffect() for constant failed: %s", SDL_GetError()); } template