1. Richard Goedeken
  2. mupen64plus-input-sdl
  3. Pull requests

Pull requests

#24 Merged
Deleted repository
default (862a7e429b62)

Use SDL2 to play force feedback effects

  1. Sven Eckelmann

A test for SDL2 force feedback.

I've had to set the time of the ingame effect to 0x7fff instead of SDL_HAPTIC_INFINITY in my tests because otherwise it isn't played at all with xboxdrv (it is a bug in the driver).This is by the way also the reason why the current implementation works for some people when using the mem/rumble switch button but not ingame. I don't have access to a gamepad with real force feedback under linux to test it. But maybe can get an XBox360 gamepad next week for a test with the xpad kernel driver.

I've tried a workaround for xboxdrv by adding following change to mupen64plus-input-sdl. This isn't a valid workaround for m64p - a bug against xboxdrv was opened instead https://github.com/Grumbel/xboxdrv/issues/47

--- a/src/plugin.c
+++ b/src/plugin.c
@@ -735,6 +735,7 @@ static void InitiateRumble(int cntrl)
      ffeffect[cntrl].id = -1;
      ffeffect[cntrl].u.rumble.strong_magnitude = 0xFFFF;
      ffeffect[cntrl].u.rumble.weak_magnitude = 0xFFFF;
+    ffeffect[cntrl].replay.length = 0x7fff; // xboxdrv is buggy and doesn't support infinite replay

      ioctl(controller[cntrl].event_joystick, EVIOCSFF, &ffeffect[cntrl]);

Comments (0)