mirror of https://github.com/mgba-emu/mgba.git
Switch: Show charging info
This commit is contained in:
parent
4b012035d8
commit
bb6ecd41cb
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue