diff options
author | Thomas Jarosch <tomj@simonv.com> | 2011-03-03 00:25:03 +0000 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2011-03-03 00:25:03 +0000 |
commit | 84926583cfcc8e1f2bff9f7743002880486e0971 (patch) | |
tree | 9de1f6b5fbd34ab31e3f8cbd94116d5f29909d53 /firmware/powermgmt.c | |
parent | f9f89cf5cb42a6540995bbb0c277e1f2e6b222b2 (diff) | |
download | rockbox-84926583cfcc8e1f2bff9f7743002880486e0971.tar.gz rockbox-84926583cfcc8e1f2bff9f7743002880486e0971.tar.bz2 rockbox-84926583cfcc8e1f2bff9f7743002880486e0971.zip |
Fix bookmark creation on sleep timer. Fixes FS#11493
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29507 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 4c265d132b..215f056c33 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... */ } |