summaryrefslogtreecommitdiff
path: root/apps/gui/gwps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/gwps.c')
-rw-r--r--apps/gui/gwps.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index dd219f166f..631c9dec15 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -255,18 +255,11 @@ long gui_wps_show(void)
255 { 255 {
256 wps_state.id3 = audio_current_track(); 256 wps_state.id3 = audio_current_track();
257 wps_state.nid3 = audio_next_track(); 257 wps_state.nid3 = audio_next_track();
258 if (wps_state.id3) { 258 restore = true; /* force initial full redraw */
259 FOR_NB_SCREENS(i)
260 {
261 if (!gui_wps_display(&gui_wps[i]))
262 exit = true;
263 }
264 }
265 } 259 }
266 260
267 while ( 1 ) 261 while ( 1 )
268 { 262 {
269 yield();
270 bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false; 263 bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false;
271 264
272 /* did someone else (i.e power thread) change audio pause mode? */ 265 /* did someone else (i.e power thread) change audio pause mode? */
@@ -328,10 +321,9 @@ long gui_wps_show(void)
328 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5); 321 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
329 } 322 }
330 323
331 /* Exit if audio has stopped playing. This can happen if using the 324 /* Exit if audio has stopped playing. This happens e.g. at end of
332 sleep timer with the charger plugged or if starting a recording 325 playlist or if using the sleep timer. */
333 from F1 */ 326 if (!(audio_status() & AUDIO_STATUS_PLAY))
334 if (!audio_status())
335 exit = true; 327 exit = true;
336/* The iPods/X5/M5 use a single button for the A-B mode markers, 328/* The iPods/X5/M5 use a single button for the A-B mode markers,
337 defined as ACTION_WPSAB_SINGLE in their config files. */ 329 defined as ACTION_WPSAB_SINGLE in their config files. */
@@ -684,13 +676,12 @@ long gui_wps_show(void)
684 { 676 {
685 FOR_NB_SCREENS(i) 677 FOR_NB_SCREENS(i)
686 { 678 {
687 if(!gui_wps_update(&gui_wps[i])) 679 gui_wps_update(&gui_wps[i]);
688 exit = true;
689 } 680 }
690 update_track = false; 681 update_track = false;
691 } 682 }
692 683
693 if (restore && 684 if (restore && wps_state.id3 &&
694 ((restoretimer == RESTORE_WPS_INSTANTLY) || 685 ((restoretimer == RESTORE_WPS_INSTANTLY) ||
695 TIME_AFTER(current_tick, restoretimer))) 686 TIME_AFTER(current_tick, restoretimer)))
696 { 687 {
@@ -699,8 +690,7 @@ long gui_wps_show(void)
699 FOR_NB_SCREENS(i) 690 FOR_NB_SCREENS(i)
700 { 691 {
701 screens[i].stop_scroll(); 692 screens[i].stop_scroll();
702 if (!gui_wps_display(&gui_wps[i])) 693 gui_wps_display(&gui_wps[i]);
703 exit = true;
704 } 694 }
705 } 695 }
706 696