Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rumble with infinite replay doesn't play at all #47

Open
ecsv opened this issue Jun 13, 2013 · 0 comments
Open

Rumble with infinite replay doesn't play at all #47

ecsv opened this issue Jun 13, 2013 · 0 comments
Labels

Comments

@ecsv
Copy link

ecsv commented Jun 13, 2013

I noticed a problem with xboxdrv when used together with mupen64plus-input-sdl. The memory/rumble pack switch effects were played but not the ingame effects. The big difference between the two are the length of the effect (or actually the replay.length because it is a FF_RUMBLE/FF_PERIODIC effect). Switching effects have a specific length and ingame effects have no length (aka infinite length) and are stopped when the emulated system requests them to be stopped.

You can find an easy example using SDL2 at https://gist.github.com/ecsv/5771853

Please read more about the the SDL_HAPTIC_INFINITY at http://wiki.libsdl.org/moin.fcg/SDL_HapticRunEffect

The infinite length is really set by replay.length as you can see at following places in the code:

http://hg.libsdl.org/SDL/file/1516fe08e6ec/src/haptic/SDL_haptic.c#l758
http://hg.libsdl.org/SDL/file/1516fe08e6ec/src/haptic/linux/SDL_syshaptic.c#l576

Here the important part from the ff-memless driver which shows that effects are only stopped when the replay.length is != 0 (it is easier to understand than the iforce-ff driver because you don't need the secret hardware specs):

http://lxr.free-electrons.com/source/drivers/input/ff-memless.c?v=3.8#L102
http://lxr.free-electrons.com/source/drivers/input/ff-memless.c?v=3.8#L367

You can also check out hid-pidff.c (pidff_set_effect_report) and compare it with the description of Duration for the value Null on page 15 of http://www.usb.org/developers/devclass_docs/pid1_01.pdf

@Grumbel Grumbel added this to the 0.8.6 milestone Jun 2, 2014
@Grumbel Grumbel added the bug label Oct 22, 2015
@Grumbel Grumbel removed this from the 0.8.6 milestone Oct 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants