mirror of https://github.com/mgba-emu/mgba.git
Switch: Round battery up
This commit is contained in:
parent
d7ec20900c
commit
b712a7208d
|
@ -359,7 +359,7 @@ static int _batteryState(void) {
|
||||||
u32 charge;
|
u32 charge;
|
||||||
int state = 0;
|
int state = 0;
|
||||||
if (R_SUCCEEDED(psmGetBatteryChargePercentage(&charge))) {
|
if (R_SUCCEEDED(psmGetBatteryChargePercentage(&charge))) {
|
||||||
state = charge / 25;
|
state = (charge + 12) / 25;
|
||||||
}
|
}
|
||||||
ChargerType type;
|
ChargerType type;
|
||||||
if (R_SUCCEEDED(psmGetChargerType(&type)) && type) {
|
if (R_SUCCEEDED(psmGetChargerType(&type)) && type) {
|
||||||
|
|
Loading…
Reference in New Issue