Ryujinx-SDL/src/power
Sam Lantinga 58a11d30de Fixed bug 4920 - Wider support for seconds of battery life left on Linux 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.
2019-12-30 13:21:47 -08:00
..
android Updated copyright for 2019 2019-01-04 22:01:14 -08:00
emscripten Updated copyright for 2019 2019-01-04 22:01:14 -08:00
haiku Updated copyright for 2019 2019-01-04 22:01:14 -08:00
linux Fixed bug 4920 - Wider support for seconds of battery life left on Linux platforms using sys interface 2019-12-30 13:21:47 -08:00
macosx Updated copyright for 2019 2019-01-04 22:01:14 -08:00
psp Updated copyright for 2019 2019-01-04 22:01:14 -08:00
uikit Updated copyright for 2019 2019-01-04 22:01:14 -08:00
windows Updated copyright for 2019 2019-01-04 22:01:14 -08:00
winrt Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_power.c Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_syspower.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00