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)
{
int resume_index = 0;
struct mp3entry *id3 = audio_current_track();
if (!id3)
if (!(audio_status() && audio_current_track()))
{
/* no track playing */
return false;

View File

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

View File

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