[WIP] universal gamepad support - #1861
Open
p3r7 wants to merge 18 commits into
Open
Conversation
Member
|
What is the test procedure to verify that a controller works as expected with the new arrangement? My collection of older stuff is unfortunately in storage at the moment but I have some 8bitdo and Microsoft units handy. |
Contributor
Author
|
progressed a bit more on this. there are still some optims & simplifications here & there i'd like to make. i also realized that the but i'm getting close to having something mergeable.
i just made a script for that:
otherwise navigating in the global menu is another way to test (though not as extensive). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

this PR provides (almost) universal gamepad support
in its current state, it works pretty well on my norns with the 3 controllers I have tested with.
how?
this PR removes the use of custom gamepad profiles as lua files and instead relies on the SDL controller profile database.
i didn't use those profiles in the first place as they were lacking the info of analog sensors resolution (
EV_ABS, ABS for absolute),but i discovered that those resolutions could be retrieved with a call to
libevdev_get_abs_info.by combining the 2, we're 100% compatible with our old custom profile logic.
i didn't know this was possible, as SDL itself seems to not look up this info and hard-codes resolution in its code source for a selected number of controllers. e.g.:
i guess they do that do be as platform-agnostic as possible...
what's next to do
everything works fine but i'm getting this error message in the matron logs when i plug a controller. everything seems to work though. idk if it was occurring before my patch or not but i may be doing something wrong.
also i just dropped the SDL gamepad db file under
lua/core/gamecontrollerdb.txt. but it may be smarter to grab it as a git submodule. what do you think about it?also i'd certainly merge the
gamepad_db.luaandgamepad.luafiles into one.