Organizing the drm backend to only use one api to allow for more devices #3879
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.
Notes
The Problem
So I'm currently using a raspberry pi and a small display plus a rotary encoder to built a little device. I'm using raylib for the software, because of the direct drm support, so I can avoid X11. Problem is: raylib doesn't support rotary encoders when selecting
PLATFORM_DRM
. This is because rotary encoders basically either have one relative or one absolute axis, but the wayrcore_drm.c
is detecting devices doesn't allow for that, it required at least two axes.Approaching the solution
So the problem now is how one classifies the different kind of input devices into the categories raylib exposes. (This isn't standardized, you probably know that). The
rotary-encoder
linux driver allows for either one absolute axis or one relative axis. Absolute axes are annoying, because rotary-encoders don't have a physical stop, so you always have to deal with weird wrapping issues. Relative axes are annoying, because gamepads don't typically have a relative axes (and thus raylibs API doesn't really allow for it ....). I for now decided on an absolute axis.What this PR changes
SUPPORT_SSH_KEYBOARD_RPI
isn't setOpen Problems