1
0
Fork 0
forked from len0rd/rockbox

Apply fix from FS#6341, with some changes by me.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14430 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Magnus Holmgren 2007-08-22 16:33:34 +00:00
parent 9295e0a489
commit a50c2b1494
3 changed files with 8 additions and 4 deletions

View file

@ -1014,9 +1014,8 @@ bool bookmark_exist(void)
static bool system_check(void) static bool system_check(void)
{ {
int resume_index = 0; int resume_index = 0;
struct mp3entry *id3 = audio_current_track();
if (!id3) if (!(audio_status() && audio_current_track()))
{ {
/* no track playing */ /* no track playing */
return false; return false;

View file

@ -98,6 +98,7 @@ long gui_wps_show(void)
bool restore = false; bool restore = false;
long restoretimer = 0; /* timer to delay screen redraw temporarily */ long restoretimer = 0; /* timer to delay screen redraw temporarily */
bool exit = false; bool exit = false;
bool bookmark = false;
bool update_track = false; bool update_track = false;
int i; int i;
long last_left = 0, last_right = 0; long last_left = 0, last_right = 0;
@ -585,6 +586,7 @@ long gui_wps_show(void)
case ACTION_WPS_STOP: case ACTION_WPS_STOP:
if (global_settings.party_mode) if (global_settings.party_mode)
break; break;
bookmark = true;
exit = true; exit = true;
break; break;
@ -624,7 +626,6 @@ long gui_wps_show(void)
break; break;
#endif #endif
case SYS_POWEROFF: case SYS_POWEROFF:
bookmark_autobookmark();
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
show_main_backdrop(); show_main_backdrop();
#endif #endif
@ -676,6 +677,7 @@ long gui_wps_show(void)
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
gui_wps[i].display->stop_scroll(); gui_wps[i].display->stop_scroll();
if (bookmark)
bookmark_autobookmark(); bookmark_autobookmark();
audio_stop(); audio_stop();
#ifdef AB_REPEAT_ENABLE #ifdef AB_REPEAT_ENABLE

View file

@ -601,6 +601,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
#ifdef SIMULATOR #ifdef SIMULATOR
(void)callback; (void)callback;
(void)parameter; (void)parameter;
bookmark_autobookmark();
call_ata_idle_notifys(true); call_ata_idle_notifys(true);
exit(0); exit(0);
#else #else
@ -664,6 +665,8 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
sleep(1); sleep(1);
} }
#endif #endif
bookmark_autobookmark();
/* audio_stop_recording == audio_stop for HWCODEC */ /* audio_stop_recording == audio_stop for HWCODEC */
audio_stop(); audio_stop();