-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
|
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. |
I solved the conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes broadly look good, but there are some things I'd like you to fix. Additionally, there's a decision to be made that I'd like your input on.
As I mentioned on Discord last night, the autoconfig system is probably a better fit for configuring sensor indexes than the UI, since mappings for a given device are likely to be the same across the board -- I wish somebody (possibly including me) had thought of that when you first submitted this PR, as it could've saved you a lot of aggravation.
On the other hand, the UI would be a good fallback for devices whose autoconfig profiles haven't been updated. But I think it would have to be updated to override (or ignore?) settings for profiles that do have sensor mappings.
What do you think? Which direction do you want to proceed in? Autoconfig + no mapping UI, or autoconfig + additional work on UI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did I get wrong when I wrote this documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That the axes aren't really mapped to any specific direction, they are kinda arbitrary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the axis remapping is implemented this might be true.
Causing every retropad binding to double
That seems like it should be a linux userspace driver issue not a libretro thing.
Yalla it's done. Kirby Tilt and Tumble works flawlessly now. |
Actually there's still a design problem |
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 gamepadsOnly the axes are hardcoded now.SDL Device selection doesn't work.Axes are no longer hardcoded but they aren't saved for some reasonRequires UDEV_TOUCH_SUPPORT to be enabled.