diff options
author | Thomas Jarosch <tomj@simonv.com> | 2011-04-16 16:57:35 +0000 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2011-04-16 16:57:35 +0000 |
commit | ff1f2e24156bc8a34eccfa9e0af4dcebdc6cf1d2 (patch) | |
tree | e92d2da19fda3cc6194e89be6783487047ddbd81 /firmware/powermgmt.c | |
parent | 6821d2ebd67bf934c6f3bba14880d0a79b021cde (diff) | |
download | rockbox-ff1f2e24156bc8a34eccfa9e0af4dcebdc6cf1d2.tar.gz rockbox-ff1f2e24156bc8a34eccfa9e0af4dcebdc6cf1d2.tar.bz2 rockbox-ff1f2e24156bc8a34eccfa9e0af4dcebdc6cf1d2.zip |
Fix premature idle shutdown on RaaA after last track finished playing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29721 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 8913c99aad..79a7a90a2b 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -831,15 +831,17 @@ void handle_auto_poweroff(void) int audio_stat = audio_status(); long tick = current_tick; -#if CONFIG_CHARGING /* * Inhibit shutdown as long as the charger is plugged in. If it is * unplugged, wait for a timeout period and then shut down. */ - if (charger_input_state == CHARGER || audio_stat == AUDIO_STATUS_PLAY) { + if (audio_stat == AUDIO_STATUS_PLAY +#if CONFIG_CHARGING + || charger_input_state == CHARGER +#endif + ) { last_event_tick = current_tick; } -#endif #if !(CONFIG_PLATFORM & PLATFORM_HOSTED) if (!shutdown_timeout && query_force_shutdown()) { |