Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 4920 - Wider support for seconds of battery life left on Li…
…nux platforms using sys interface Murad On my system, SDL_GetPowerInfo() returns -1 seconds of battery life left. I have quickly investigated that in my case SDL uses sys interface to get battery data. It tries to read "time_to_empty_now" file which is not always present. However, it is still possible to calculate remaining lifetime using "energy_now" and "power_now" files. This is what my simple patch (included as attachment) tries to accomplish. Best wishes.
- Loading branch information