Support adding advanced joypad features#111707
Conversation
a262927 to
7ae6781
Compare
There was a problem hiding this comment.
Tested locally on Windows 11 24H2 with a DualSense Edge on the joypads demo (rebased on top of master 6fd949a), it works as expected. Code looks good to me.
(This PR doesn't add any new features, but I still tested it to ensure there are no regressions from this PR on its own.)
Repiteo
left a comment
There was a problem hiding this comment.
The changes are indeed isolated, and having a standalone foundation makes perfect sense
|
Thanks! |
|
Hello @Nintorch, I do not have a controller that allows me to manage the color of the LEDs.
https://gtibo.github.io/godot-4.6-release-page/ To give you some context, this is your PR entry on the page (System > Input sub-section) |
|
I do! https://drive.google.com/file/d/1X-obbkyEhNIYN3KO7HVYnvNIRTM41VoY/view?usp=sharing |
Hey Nintorch! Thanks for the quick reply :)! Thanks for the feedback, if you want, you can make a PR on the page project to edit the text so it better fit your vision. |
|
You're welcome! :) |
|
Hey Nintorch, in is moment, only the Light Bar have access in Godot 4.6? |
Hi :) Yes, in Godot 4.6 the only advanced joypad feature is the light bar. |
|
Have prediction for Adaptive Triggers? |
We're currently not sure if they should be built into Godot or be available as an addon in the future when I expose an SDL subsystem that can be used (HIDAPI). |
|
SDL is only in Windows, and the HIDAPI in Linux and MacOS? |
|
In Godot SDL is used on Windows, Linux and macOS, and hidapi is available on all these 3 platforms :) |
|
Having problems in expose more features? |
|
One of the problems is the lack of willingness to write all the boilerplate code that is required for new classes 😅 (see also #114642 for an example) |
|
@Tio-Henry Please avoid using a merged PR as a Q&A which isn't directly linked to the PR itself. If you have questions about the implementation, you can join the Godot contributors chat to ask about it. |
|
Wow, I took a look, and for each feedback effect, is it necessary to write separate code for each one? |
I'm sorry |
Co-authored-by: Nintorch <92302738+Nintorch@users.noreply.github.com>

Base PR for #111679, #111681, #111682 and others.
Fixes #78805 (see #107967 (comment) )
This PR adds the option to add more advanced features to joypads in the future that require the
Inputcode to call methods fromJoypadSDL(or other drivers) without breaking encapsulation, basically dependency injection. Such methods include, for example, checking if a joypad has motion sensors, LED lights, enabling the motion sensors, changing LED light color, etc.This PR also adds the HIDAPI joysticks support for Linux and macOS, as well as Windows sensors subsystem so that it can be used later for motion sensors and other features.
This PR is separated from the other 3 so that they can be reviewed independently from the motion sensors PR. Let me know if this is a good idea :D