Emulator Issues #4429
closedHaptic Support under Linux with SDL 1.2
0%
Description
SDL 1.3 is still a long time coming so I wrote a patch that adds haptic (rumble) support under Linux.
Because I have not found a way to find the event device for the joystick (gamepad) you need to set an environment variable to tell dolphin which event device should be used for which joystick.
E.g. this sets the event device of the first joystick:
export DOLPHIN_EVENT_JOYSTICK0=/dev/input/event0
See the attached file.
Updated by NeoBrainX over 13 years ago
Thanks for the patch, not sure if this is safe enough to apply during feature freeze though...
Updated by bloody.albatross over 13 years ago
On one hand it is definitely a new feature so it shouldn't be merged in feature freeze. On the other hand I think it is completely "safe". It does not do anything if the user does not configure a rumble effect or does not set the environment variable and what it does are IO operations that should only cause error messages to be printed to the console in case something is wrong. And unless the environment variable points to something wrong I see no way anything can go wrong.
Also a new patch is attached. The only change is for the value of effect.replay.length. Apparently 0 means infinite (looked at SDL 1.3 source for that because it is not documented in Linux's ff.txt).
Updated by Billiard26 over 13 years ago
Patch looks fine.
It would be cool if we could remove SDL entirely, using native stuff for input and output.
Updated by glennricster over 13 years ago
Billiard: On linux SDL is about the only way to go for some of these controller inputs. Of course on linux SDL is pretty much native also.
Updated by nakeee over 13 years ago
Now features freeze is over.
Should this patch be submitted?
Updated by glennricster over 13 years ago
It looks good to me. Although I don't have any controllers to test this with, so I can only base my decision on the perusal of the code.
Updated by glennricster over 13 years ago
It seems that using the XInput extension this could be done at a slightly higher level (i.e. without raw dev access), and devices could be detected without setting an environment variable.
Updated by parlane over 12 years ago
Will this ever be included? If not, mark as WontFix.