summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/bookmark.c3
-rw-r--r--apps/gui/gwps.c6
-rw-r--r--apps/misc.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index fa1bd4751d..b2c2713716 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -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;
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 3defead099..1e5720e154 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -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();
diff --git a/apps/misc.c b/apps/misc.c
index e4149581f5..23c332af2f 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -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();