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

Support for motion in evdev joystick backend #4457

Closed
v1993 opened this issue Jun 17, 2021 · 1 comment
Closed

Support for motion in evdev joystick backend #4457

v1993 opened this issue Jun 17, 2021 · 1 comment

Comments

@v1993
Copy link

v1993 commented Jun 17, 2021

Right now, SDL only supports motion input when using hidraw. This is troublesome for applications that
rely heavily on motion and want to work on Linux, since a) hidraw isn't enabled by default on Linux b) there are good reasons behind that, involving kernel drivers and permission issues.

On a plus side, evdev totally supports motion input and joystick drivers make use of this interface. On a downside, motion input is exposed as separate device from main joystick and there isn't a standard axis mapping (it varies per joystick, so some kind of database is needed).

Right now, SDL just exposes those extra motion devices as joysticks, causing some confusion. A possibility would be to check if device have INPUT_PROP_ACCELEROMETER property and use them as motion source for device that have no such flag set (main joystick device) and have same non-empty uniq value.

I'm by no means knowledgeable about SDL internals, but feel free to ask me about motion via evdev, I'll try to help.

@slouken
Copy link
Collaborator

slouken commented Nov 16, 2022

This will be implemented in #6478, thanks!

@slouken slouken closed this as completed Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants