Add support for setting a joypad's LED light color#111681
Add support for setting a joypad's LED light color#111681Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
2a8f3b9 to
bad86bd
Compare
58c44c2 to
3ec4e25
Compare
Meorge
left a comment
There was a problem hiding this comment.
Tested on macOS with both a DualSense (PS5) and DualShock (PS4) controller, wired and wireless, and works great in all cases! 😄
For convenience for anyone else testing this, here's a very minimal project that displays a color picker when a supported controller is connected:
test-joypad-led.zip
bruvzg
left a comment
There was a problem hiding this comment.
Tested on macOS and Windows with DualSense controller, working as expected.
|
Thank you for your reviews, bruvzg and AThousandShips! |
|
Now that I think about it, should we provide an |
|
I'd say to leave it without a method to get it to reduce clutter and confusion, assuming the color is expected to change downstream and the return value is expected to not be reliable |
|
Thank you for your review, Mickeon! I included your suggested changes into the code! |
|
May I ask if there are other reviewers that need to review this PR before it can be merged? |
|
Thanks! |
|
You're welcome! And thank you too! :) |
Based on #111707 (it can be closed if this PR can be merged)
I decided to split my big SDL3 joypad features PR ( #107967 ) into several smaller PRs, this PR is one of them.
This PR adds the ability to set the color/brightness of a joypad's LED light color, if it has one. An example of a controller with an LED light is DualShock 4.
This PR hasn't been tested yet 😅 but it should work correctly since I copied the code from my earlier PR that had this feature working correctly.
After the CI passes, I will test it and create a small test project.(Not sure it's required, this PR is a pretty simple one, it only adds 2 more methods on top of the motion sensors PR)TODO: