From 84926583cfcc8e1f2bff9f7743002880486e0971 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Thu, 3 Mar 2011 00:25:03 +0000 Subject: Fix bookmark creation on sleep timer. Fixes FS#11493 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29507 a1c6a512-1295-4272-9138-f99709370657 --- firmware/powermgmt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 4c265d1..215f056 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -33,6 +33,7 @@ #include "usb.h" #include "powermgmt.h" #include "backlight.h" +#include "bookmark.h" #include "lcd.h" #include "rtc.h" #if CONFIG_TUNER @@ -843,14 +844,14 @@ void handle_sleep_timer(void) /* Handle sleeptimer */ if (TIME_AFTER(current_tick, sleeptimer_endtick)) { - audio_stop(); - if (usb_inserted() #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) || charger_input_state != NO_CHARGER #endif ) { DEBUGF("Sleep timer timeout. Stopping...\n"); + bookmark_autobookmark(false); + audio_stop(); set_sleep_timer(0); backlight_off(); /* Nighty, nighty... */ } -- cgit v1.1