| Summary: | (Patch) Hint SDL_HINT_SWITCH_HOME_LIT to let the user opt out of having Switch controllers' Home button lit when opened. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | jibb |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.15 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 10 | ||
| Attachments: | Patch with the proposed change | ||
Actually the biggest motivating factor for me was that while the player number LED and the PlayStation controller lights all turn off on their own after disconnect or after a little while without being pinged, respectively, the Switch Home button light stays on as long as the controller is charged, which bothers me as someone who will frequently disconnect controllers without closing an application. In my own application I could of course turn the light off right away, but it makes sense to me that they shouldn't be initialised to ON in that case. The PlayStation controller powers off, which is what is turning off the LED in that case. I wonder if we really need to have functionality to turn off the Switch controller after an idle timeout, to prevent the battery from running down? (In reply to Sam Lantinga from comment #2) > The PlayStation controller powers off, which is what is turning off the LED > in that case. I wonder if we really need to have functionality to turn off > the Switch controller after an idle timeout, to prevent the battery from > running down? Oh interesting. I recall having to remind the DS4 to keep its light on, even while otherwise using the controller, but it's a long time since I tested that functionality in my library and I guess I'm misremembering (or have done it wrong). But yeah, I agree that draining the battery after disconnect is a concern with leaving the light on indefinitely. A time-out is a good idea, but only works as long as the user doesn't disconnect their controller, right? I often disconnect / reconnect my controllers on the fly because my Bluetooth can't keep up with more than one at a time. Whether it's a Switch-specific hint or a general one, as an application developer I'd certainly appreciate a way to turn off the Home LED or have it not turned on in the first place, and I can't find any way to set it at present. I changed the name of the hint and added your change: https://hg.libsdl.org/SDL/rev/b8180eae61c6 (In reply to Sam Lantinga from comment #4) > I changed the name of the hint and added your change: > https://hg.libsdl.org/SDL/rev/b8180eae61c6 Thank you so much :) You're welcome! |
Created attachment 4686 [details] Patch with the proposed change New hint SDL_HINT_SWITCH_HOME_LIT to let the user opt out of having Switch controllers' Home button lit when opened. This is more consistent with the Switch itself (which doesn't light the button normally) and may be preferred by users who may disconnect their controller without letting the application close it. I think this warrants a Switch-specific hint because the default behaviour is unusual (inconsistent with using a Switch controller on a Switch itself or with some other programs on PC), and because of that it's distinct from other lights (the player number on Switch controllers and the player colour on PlayStation controllers).