Index: apps/misc.c =================================================================== RCS file: /cvsroot/rockbox/apps/misc.c,v retrieving revision 1.41 diff -u -b -r1.41 misc.c --- apps/misc.c 1 Oct 2005 10:20:50 -0000 1.41 +++ apps/misc.c 20 Oct 2005 17:08:20 -0000 @@ -47,6 +47,7 @@ #include "ata_mmc.h" #endif #include "tree.h" +#include "bookmark.h" #ifdef HAVE_LCD_BITMAP #include "bmp.h" @@ -419,6 +420,10 @@ if(!charger_inserted()) #endif { + if ((global_settings.autocreatebookmark == BOOKMARK_YES) && + ((audio_status() & AUDIO_STATUS_PLAY) == AUDIO_STATUS_PLAY)) + bookmark_autobookmark(); + lcd_clear_display(); splash(0, true, str(LANG_SHUTTINGDOWN)); if (callback != NULL) Index: firmware/powermgmt.c =================================================================== RCS file: /cvsroot/rockbox/firmware/powermgmt.c,v retrieving revision 1.90 diff -u -b -r1.90 powermgmt.c --- firmware/powermgmt.c 14 Sep 2005 09:08:26 -0000 1.90 +++ firmware/powermgmt.c 20 Oct 2005 17:08:21 -0000 @@ -47,6 +47,7 @@ #include "tlv320.h" #endif #include "logf.h" +#include "../apps/settings.h" /* * Define DEBUG_FILE to create a csv (spreadsheet) with battery information @@ -404,12 +405,12 @@ { if(TIME_AFTER(current_tick, sleeptimer_endtick)) { - audio_stop(); #if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING) if((charger_input_state == CHARGER) || (charger_input_state == CHARGER_PLUGGED)) { DEBUGF("Sleep timer timeout. Stopping...\n"); + audio_stop(); set_sleep_timer(0); backlight_off(); /* Nighty, nighty... */ }