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

Summary: SDL_GetPowerInfo always returns SDL_POWERSTATE_UNKNOWN/SDL_FALSE
Product: SDL Reporter: Jason Wyatt <jwyatt>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: HG 2.1   
Hardware: x86_64   
OS: Linux   

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.