We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2938 - SDL_GetPowerInfo always returns SDL_POWERSTATE_UNKNOWN/SDL_FALSE
Summary: SDL_GetPowerInfo always returns SDL_POWERSTATE_UNKNOWN/SDL_FALSE
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-09 12:49 UTC by Jason Wyatt
Modified: 2015-06-03 20:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Wyatt 2015-04-09 12:49:17 UTC
SDL is currently trying to read battery information from /proc/acpi/battery. This does not exists on newer setups, with battery information having moved to /sys/class/power_supply/BAT*.
Comment 1 Ryan C. Gordon 2015-06-03 20:12:39 UTC
Eventually we'd want to talk to UPower over d-bus (see Bug #2170), but in the interest of older and embedded machines that don't have that interface, and in the interest of having our API working at all in 2.0.4, I've implemented the sysfs stuff in https://hg.libsdl.org/SDL/rev/d8cc85e50561

--ryan.