Skip to content

Update Linux gamepad detection to match SDL.#40591

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
madmiraal:fix-24526
Jul 31, 2020
Merged

Update Linux gamepad detection to match SDL.#40591
akien-mga merged 1 commit into
godotengine:masterfrom
madmiraal:fix-24526

Conversation

@madmiraal
Copy link
Copy Markdown
Contributor

Simplifies and eases the constraints on what is considered a gamepad: basically anything with an absolute x- and a y-axis (i.e. not a mouse, which uses relative coordinates) is considered a gamepad. So this will include trackpads and tablets too, but this is probably a desired side-effect.

Could fix #24526, but it will need to be tested, because the issue claims that test_bit(EV_KEY, evbit) returns false with a rudder. Also may cause a regression following effectively reverting #37261 too (which added a specific exception that excludes the EV_KEY test but adds two more axes tests ABS_RX and ABS_RY). If either is the case then the test_bit(EV_KEY, evbit) can be dropped too. However, I've kept it, because this is the logic currently used by SDL.

@akien-mga
Copy link
Copy Markdown
Member

Let's merge to get this tested in the master branch.

@akien-mga akien-mga merged commit 1cee894 into godotengine:master Jul 31, 2020
@akien-mga
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No input events for rudder pedals on Linux

2 participants