Switch: Show charging info

This commit is contained in:
Vicki Pfau 2018-09-18 20:51:52 -07:00
parent 4b012035d8
commit bb6ecd41cb
1 changed files with 4 additions and 0 deletions

View File

@ -312,6 +312,10 @@ static int _batteryState(void) {
if (R_SUCCEEDED(psmGetBatteryChargePercentage(&charge))) { if (R_SUCCEEDED(psmGetBatteryChargePercentage(&charge))) {
state = charge / 25; state = charge / 25;
} }
ChargerType type;
if (R_SUCCEEDED(psmGetChargerType(&type)) && type) {
state |= BATTERY_CHARGING;
}
return state; return state;
} }