-
-
Notifications
You must be signed in to change notification settings - Fork 192
Added set_led method for Joystick and Controller objects #3507
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
Added set_led method for Joystick and Controller objects #3507
Conversation
Simple test script: import pygame.joystick
pygame.joystick.init()
joy = pygame.joystick.Joystick(0)
joy.set_led(pygame.Color(255, 0, 0)) |
trim.CE315EE5-953B-48EA-A006-A9C5B8149BAE.MOV |
I don't currently have a functional SDL3 setup, is someone else able to test it? |
Tested on SDL3, and after fixing different errors (none of them related to your PR), I can confirm it works, so 👍 on that. However, I agree with Ankith comments on what should be fixed |
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.
There is also SDL_GameControllerSetLED in controller module so that should be added as well
….set_led, and use pg_RGBAFromObjEx instead of pg_RGBAFromObj
…into SDL_JoystickSetLED
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.
LGTM, thanks for the PR 🎉
I do not have the hardware to test this, but I request @zoldalma999 s review on this as our controller/joystick expert.
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.
Great. Thank you for the PR, 👍
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.
LGTM, apart from one comment
@zoldalma999 fixed your nitpick (it was a valid nitpick that I overlooked) |
closes #3506