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
udev and SDL Sensor and Touchpad #16188
base: master
Are you sure you want to change the base?
Conversation
optimizations SDL touchpad support bugfixes
The checks failed due to the UDEV_TOUCH_SUPPORT not being defined. I'm not really sure what to do should I add a UDEV_SENSOR_SUPPORT macro for the sensor code? |
To make some test
and apply this patch either with
|
You need to fix the failing CI tasks |
Will do |
Linux x86 pipeline still failing. |
It seems that sensor API has been introduced in SDL version 2.0.9. And we are using SDL 2.0.4 for the CI as we are building under Xenial. |
Even if the build succeeds I don't want the pull request merged yet. It works adequately now for testing but to be usable I need to add a lot of options to adjust sensitivity and mapping. The problem is RN the retropad stack assumes there's only one set of sensors... safe assumption to make on mobile. Not so much with sensor enabled controllers. An example is that on the dualsense is the way it's set up by default you have to point the shoulder buttons up. Most people play games with the face buttons pointing up so it makes playing extremely unintuitive. I only made the pull request so people will be aware that I am working on it and maybe get some more testing on it. Please don't merge it until it's complete. |
You can tell GitHub to mark the PR as a draft, which will prevent it from being merged until you tell it that it's ready for review. |
CI Linux (i686) still fails. Is SDL_Sensor only available on specific SDL versions? Can we have a compile-time ifdefs for this? |
It seems there is a macro SDL_VERSION_ATLEAST so we could use |
I was going to say that maybe we should drop support for ancient versions of SDL2, but turns out SDL 2.0.9 released in 2018 so it isn't that old. |
I am confused the release date indicates May 24, 2022 ? |
Idk the tags tab says 2018. But when you click on it it says 2022. Maybe they have been pushing commits to it until then. https://github.com/libsdl-org/SDL/tags?after=release-2.0.18 Edit: I found https://www.phoronix.com/news/SDL-2.0.9-Released confirming it's from 2018. |
So someone on discord told me I should open the pull request at this state without the menu options. And then either future me or someone who knows their way around the menu code can implement it. Right now it's functional in both udev and SDL but the axes aren't where the software expects them. So in Kirby: Tilt N Tumble for example requires you to hold the dualshock horizontally when the game boots and tilt backwards to move forwards. However it does work and there are even menu options to adjust sensitivity and select which sensor device you want to use so I think it's adequate. |
Description
Implemented Sensor and Touchpad Support for SDL and udev.
Related Issues
#16162
Reviewers
@gouchi @warmenhoven
Known Issues with the pull request
Everything is hardcoded and not adjustable by the user. Which causes problems if an unrelated device such as a mouse takes device 0. Also if you swap the gamepadsRequires UDEV_TOUCH_SUPPORT to be enabled.