Project

General

Profile

Actions

Emulator Issues #4429

closed

Haptic Support under Linux with SDL 1.2

Added by bloody.albatross almost 13 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

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.


Related issues 1 (0 open1 closed)

Is duplicate of Emulator - Emulator Issues #5527: [PATCH 2/2] Add periodic effects for haptic devices.Fixed

Actions
Actions #1

Updated by bloody.albatross almost 13 years ago

Here is the patch.

Actions #2

Updated by NeoBrainX almost 13 years ago

Thanks for the patch, not sure if this is safe enough to apply during feature freeze though...

Actions #3

Updated by bloody.albatross almost 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).

Actions #4

Updated by Billiard26 almost 13 years ago

Patch looks fine.
It would be cool if we could remove SDL entirely, using native stuff for input and output.

Actions #5

Updated by glennricster almost 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.

Actions #6

Updated by nakeee almost 13 years ago

Now features freeze is over.
Should this patch be submitted?

Actions #7

Updated by glennricster almost 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.

Actions #8

Updated by glennricster almost 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.

Actions #9

Updated by parlane about 12 years ago

Will this ever be included? If not, mark as WontFix.

Actions #10

Updated by Anonymous almost 12 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF