diff options
Diffstat (limited to 'apps/misc.c')
| -rw-r--r-- | apps/misc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/misc.c b/apps/misc.c index 3dfc289..07b4c94 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -264,8 +264,12 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) scrobbler_poweroff(); #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) +#if CONFIG_CHARGING >= CHARGING_MONITOR + if(!charging_state()) +#else if(!charger_inserted()) #endif +#endif { bool batt_safe = battery_level_safe(); int audio_stat = audio_status(); @@ -406,7 +410,11 @@ bool list_stop_handler(void) if (TIME_BEFORE(current_tick, last_off + HZ/2)) { - if (charger_inserted()) +#if CONFIG_CHARGING >= CHARGING_MONITOR + if (charging_state()) +#else + if (charger_inserted()) +#endif { charging_splash(); ret = true; /* screen is dirty, caller needs to refresh */ |