summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/powermgmt.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 80b6a80b2b..374f10c8f8 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -315,17 +315,10 @@ static void handle_auto_poweroff(void)
315 !sleeptimer_active))) 315 !sleeptimer_active)))
316 { 316 {
317 if(TIME_AFTER(current_tick, last_keypress + timeout) && 317 if(TIME_AFTER(current_tick, last_keypress + timeout) &&
318 TIME_AFTER(current_tick, last_disk_activity + timeout)) 318 TIME_AFTER(current_tick, last_disk_activity + timeout) &&
319 TIME_AFTER(current_tick, last_charge_time + timeout))
319 { 320 {
320 if (mpeg_stat == (MPEG_STATUS_PLAY | MPEG_STATUS_PAUSE)) 321 power_off();
321 {
322 mpeg_stop();
323 }
324
325 if (TIME_AFTER(current_tick, last_charge_time + timeout))
326 {
327 power_off();
328 }
329 } 322 }
330 } 323 }
331 else 324 else