Skip to content

Commit

Permalink
USB: Work around FFB dropouts with modern wheels
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
badfontkeming authored and F0bes committed Oct 13, 2024
1 parent 69de95d commit dafca1e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pcsx2/USB/usb-pad/usb-pad-sdl-ff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
Expand Down

0 comments on commit dafca1e

Please sign in to comment.