summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2007-08-22 16:33:34 +0000
committerMagnus Holmgren <magnushol@gmail.com>2007-08-22 16:33:34 +0000
commita50c2b149497c3213e0d52c5572a70008de13cb6 (patch)
treefe77f778dcd3f60bef66f670025ad873ce540c59
parent9295e0a489101f040ea1dcafb35ca89e97a37315 (diff)
downloadrockbox-a50c2b149497c3213e0d52c5572a70008de13cb6.tar.gz
rockbox-a50c2b149497c3213e0d52c5572a70008de13cb6.zip
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
-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)
1014static bool system_check(void) 1014static bool system_check(void)
1015{ 1015{
1016 int resume_index = 0; 1016 int resume_index = 0;
1017 struct mp3entry *id3 = audio_current_track();
1018 1017
1019 if (!id3) 1018 if (!(audio_status() && audio_current_track()))
1020 { 1019 {
1021 /* no track playing */ 1020 /* no track playing */
1022 return false; 1021 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)
98 bool restore = false; 98 bool restore = false;
99 long restoretimer = 0; /* timer to delay screen redraw temporarily */ 99 long restoretimer = 0; /* timer to delay screen redraw temporarily */
100 bool exit = false; 100 bool exit = false;
101 bool bookmark = false;
101 bool update_track = false; 102 bool update_track = false;
102 int i; 103 int i;
103 long last_left = 0, last_right = 0; 104 long last_left = 0, last_right = 0;
@@ -585,6 +586,7 @@ long gui_wps_show(void)
585 case ACTION_WPS_STOP: 586 case ACTION_WPS_STOP:
586 if (global_settings.party_mode) 587 if (global_settings.party_mode)
587 break; 588 break;
589 bookmark = true;
588 exit = true; 590 exit = true;
589 break; 591 break;
590 592
@@ -624,7 +626,6 @@ long gui_wps_show(void)
624 break; 626 break;
625#endif 627#endif
626 case SYS_POWEROFF: 628 case SYS_POWEROFF:
627 bookmark_autobookmark();
628#if LCD_DEPTH > 1 629#if LCD_DEPTH > 1
629 show_main_backdrop(); 630 show_main_backdrop();
630#endif 631#endif
@@ -676,7 +677,8 @@ long gui_wps_show(void)
676 677
677 FOR_NB_SCREENS(i) 678 FOR_NB_SCREENS(i)
678 gui_wps[i].display->stop_scroll(); 679 gui_wps[i].display->stop_scroll();
679 bookmark_autobookmark(); 680 if (bookmark)
681 bookmark_autobookmark();
680 audio_stop(); 682 audio_stop();
681#ifdef AB_REPEAT_ENABLE 683#ifdef AB_REPEAT_ENABLE
682 ab_reset_markers(); 684 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)
601#ifdef SIMULATOR 601#ifdef SIMULATOR
602 (void)callback; 602 (void)callback;
603 (void)parameter; 603 (void)parameter;
604 bookmark_autobookmark();
604 call_ata_idle_notifys(true); 605 call_ata_idle_notifys(true);
605 exit(0); 606 exit(0);
606#else 607#else
@@ -664,6 +665,8 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
664 sleep(1); 665 sleep(1);
665 } 666 }
666#endif 667#endif
668 bookmark_autobookmark();
669
667 /* audio_stop_recording == audio_stop for HWCODEC */ 670 /* audio_stop_recording == audio_stop for HWCODEC */
668 audio_stop(); 671 audio_stop();
669 672