Switch: Show charging info
Vicki Pfau vi@endrift.com
Tue, 18 Sep 2018 20:51:52 -0700
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/platform/switch/main.c
→
src/platform/switch/main.c
@@ -312,6 +312,10 @@ int state = 0;
if (R_SUCCEEDED(psmGetBatteryChargePercentage(&charge))) { state = charge / 25; } + ChargerType type; + if (R_SUCCEEDED(psmGetChargerType(&type)) && type) { + state |= BATTERY_CHARGING; + } return state; }