summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/powermgmt.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 80b6a80..374f10c 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -315,17 +315,10 @@ static void handle_auto_poweroff(void)
!sleeptimer_active)))
{
if(TIME_AFTER(current_tick, last_keypress + timeout) &&
- TIME_AFTER(current_tick, last_disk_activity + timeout))
+ TIME_AFTER(current_tick, last_disk_activity + timeout) &&
+ TIME_AFTER(current_tick, last_charge_time + timeout))
{
- if (mpeg_stat == (MPEG_STATUS_PLAY | MPEG_STATUS_PAUSE))
- {
- mpeg_stop();
- }
-
- if (TIME_AFTER(current_tick, last_charge_time + timeout))
- {
- power_off();
- }
+ power_off();
}
}
else