all repos — mgba @ b712a7208d0f9fc4ac2bd6648c4ee9b446f6c96b

mGBA Game Boy Advance Emulator

Switch: Round battery up
Vicki Pfau vi@endrift.com
Thu, 20 Sep 2018 11:20:05 -0700
commit

b712a7208d0f9fc4ac2bd6648c4ee9b446f6c96b

parent

d7ec20900c0855b8e55bea1d80138b1ba2bb2d20

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/switch/main.csrc/platform/switch/main.c

@@ -359,7 +359,7 @@ static int _batteryState(void) {

u32 charge; int state = 0; if (R_SUCCEEDED(psmGetBatteryChargePercentage(&charge))) { - state = charge / 25; + state = (charge + 12) / 25; } ChargerType type; if (R_SUCCEEDED(psmGetChargerType(&type)) && type) {