| Summary: | SDL_GetPowerInfo reads battery status for PS4 controller | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Jesper Stefansson <jesper.stefansson> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | ||
| Version: | 2.0.4 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Jesper Stefansson
2016-11-10 13:19:47 UTC
Okay, so I looked to see if there's some field in /sys/class/power_supply that says "this is just a thing with a battery" verses "this a battery that keeps the system going" and there doesn't appear to be one. The UPower developers asked about this very issue on the kernel mailing list for Wacom tablets that did the same thing: http://lkml.iu.edu/hypermail/linux/kernel/1106.2/02961.html ...saying, "I really don't want to blacklist 'battery_wacom' as that seems like such a hack." But that was 2011, and it doesn't look like the kernel provided an interface to fix this, so here's the Fedora project blacklisting battery_wacom in UPower... https://lists.fedoraproject.org/pipermail/scm-commits/2011-September/655901.html So basically: my limited research suggests UPower is doing the work to filter out known devices in this regard, so the solution here is for SDL to talk to UPower, which we actually already have a FIXME for. I'll try to write that soon. --ryan. I've now implemented UPower support in https://hg.libsdl.org/SDL/rev/5be3faa49e54, so I believe this bug should be fixed. (Please reopen it if your PS4 controller is still causing this problem, but there's an explicit check in the patch to ignore input devices with batteries, so we should be okay here, I think.) --ryan. |