Apply fix for FS#9203 (WPS gets corrupted after changing status bar setting) by Thoma...
[kugel-rb.git] / apps / gui / gwps.c
blobae0a230919cde72fad303a8e7b16c8c8bbf4829b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 Jerome Kuptz
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #include <stdio.h>
22 #include <string.h>
23 #include <stdlib.h>
24 #include "config.h"
26 #include "system.h"
27 #include "file.h"
28 #include "lcd.h"
29 #include "font.h"
30 #include "backlight.h"
31 #include "action.h"
32 #include "kernel.h"
33 #include "filetypes.h"
34 #include "debug.h"
35 #include "sprintf.h"
36 #include "settings.h"
37 #include "gwps.h"
38 #include "gwps-common.h"
39 #include "audio.h"
40 #include "usb.h"
41 #include "status.h"
42 #include "ata.h"
43 #include "screens.h"
44 #include "playlist.h"
45 #ifdef HAVE_LCD_BITMAP
46 #include "icons.h"
47 #include "peakmeter.h"
48 #endif
49 #include "action.h"
50 #include "lang.h"
51 #include "bookmark.h"
52 #include "misc.h"
53 #include "sound.h"
54 #include "onplay.h"
55 #include "abrepeat.h"
56 #include "playback.h"
57 #include "splash.h"
58 #include "cuesheet.h"
59 #include "ata_idle_notify.h"
60 #include "root_menu.h"
61 #include "backdrop.h"
62 #include "quickscreen.h"
64 /* currently only on wps_state is needed */
65 struct wps_state wps_state;
66 struct gui_wps gui_wps[NB_SCREENS];
67 static struct wps_data wps_datas[NB_SCREENS];
69 /* change the path to the current played track */
70 static void wps_state_update_ctp(const char *path);
71 /* initial setup of wps_data */
72 static void wps_state_init(void);
73 /* initial setup of a wps */
74 static void gui_wps_init(struct gui_wps *gui_wps);
75 /* connects a wps with a format-description of the displayed content */
76 static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data);
77 /* connects a wps with a screen */
78 static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display);
79 /* connects a wps with a statusbar*/
80 static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar);
82 static void prev_track(unsigned skip_thresh)
84 if (!wps_state.id3 || (wps_state.id3->elapsed < skip_thresh*1000)) {
85 audio_prev();
87 else {
88 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
90 curr_cuesheet_skip(-1, wps_state.id3->elapsed);
91 return;
94 if (!wps_state.paused)
95 #if (CONFIG_CODEC == SWCODEC)
96 audio_pre_ff_rewind();
97 #else
98 audio_pause();
99 #endif
101 audio_ff_rewind(0);
103 #if (CONFIG_CODEC != SWCODEC)
104 if (!wps_state.paused)
105 audio_resume();
106 #endif
110 static void next_track(void)
112 /* take care of if we're playing a cuesheet */
113 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
115 if (curr_cuesheet_skip(1, wps_state.id3->elapsed))
117 /* if the result was false, then we really want
118 to skip to the next track */
119 return;
123 audio_next();
127 long gui_wps_show(void)
129 long button = 0;
130 bool restore = false;
131 long restoretimer = 0; /* timer to delay screen redraw temporarily */
132 bool exit = false;
133 bool bookmark = false;
134 bool update_track = false;
135 int i;
136 long last_left = 0, last_right = 0;
138 wps_state_init();
140 #ifdef HAVE_LCD_CHARCELLS
141 status_set_audio(true);
142 status_set_param(false);
143 #else
144 #if LCD_DEPTH > 1
145 show_wps_backdrop();
146 #endif /* LCD_DEPTH > 1 */
147 #endif
149 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
150 show_remote_wps_backdrop();
151 #endif
153 #ifdef AB_REPEAT_ENABLE
154 ab_repeat_init();
155 ab_reset_markers();
156 #endif
158 if(audio_status() & AUDIO_STATUS_PLAY)
160 wps_state.id3 = audio_current_track();
161 wps_state.nid3 = audio_next_track();
162 if (wps_state.id3) {
163 if (gui_wps_display())
164 return 0;
165 FOR_NB_SCREENS(i)
166 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL);
167 wps_state_update_ctp(wps_state.id3->path);
170 restore = true;
172 while ( 1 )
174 bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false;
176 /* did someone else (i.e power thread) change audio pause mode? */
177 if (wps_state.paused != audio_paused) {
178 wps_state.paused = audio_paused;
180 /* if another thread paused audio, we are probably in car mode,
181 about to shut down. lets save the settings. */
182 if (wps_state.paused) {
183 settings_save();
184 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
185 call_ata_idle_notifys(true);
186 #endif
190 #ifdef HAVE_LCD_BITMAP
191 /* when the peak meter is enabled we want to have a
192 few extra updates to make it look smooth. On the
193 other hand we don't want to waste energy if it
194 isn't displayed */
195 bool pm=false;
196 FOR_NB_SCREENS(i)
198 if(gui_wps[i].data->peak_meter_enabled)
199 pm = true;
202 if (pm) {
203 long next_refresh = current_tick;
204 long next_big_refresh = current_tick + HZ / 5;
205 button = BUTTON_NONE;
206 while (TIME_BEFORE(current_tick, next_big_refresh)) {
207 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,TIMEOUT_NOBLOCK);
208 if (button != ACTION_NONE) {
209 break;
211 peak_meter_peek();
212 sleep(0); /* Sleep until end of current tick. */
214 if (TIME_AFTER(current_tick, next_refresh)) {
215 FOR_NB_SCREENS(i)
217 if(gui_wps[i].data->peak_meter_enabled)
218 gui_wps_refresh(&gui_wps[i], 0,
219 WPS_REFRESH_PEAK_METER);
220 next_refresh += HZ / PEAK_METER_FPS;
227 /* The peak meter is disabled
228 -> no additional screen updates needed */
229 else {
230 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
232 #else
233 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
234 #endif
236 /* Exit if audio has stopped playing. This can happen if using the
237 sleep timer with the charger plugged or if starting a recording
238 from F1 */
239 if (!audio_status())
240 exit = true;
241 /* The iPods/X5/M5 use a single button for the A-B mode markers,
242 defined as ACTION_WPSAB_SINGLE in their config files. */
243 #ifdef ACTION_WPSAB_SINGLE
244 if (!global_settings.party_mode && ab_repeat_mode_enabled())
246 static int wps_ab_state = 0;
247 if (button == ACTION_WPSAB_SINGLE)
249 switch (wps_ab_state)
251 case 0: /* set the A spot */
252 button = ACTION_WPS_ABSETA_PREVDIR;
253 break;
254 case 1: /* set the B spot */
255 button = ACTION_WPS_ABSETB_NEXTDIR;
256 break;
257 case 2:
258 button = ACTION_WPS_ABRESET;
259 break;
261 wps_ab_state = (wps_ab_state+1) % 3;
264 #endif
265 switch(button)
267 case ACTION_WPS_CONTEXT:
268 #if LCD_DEPTH > 1
269 show_main_backdrop();
270 #endif
271 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
272 show_remote_main_backdrop();
273 #endif
274 /* if music is stopped in the context menu we want to exit the wps */
275 if (onplay(wps_state.id3->path,
276 FILE_ATTR_AUDIO, CONTEXT_WPS) == ONPLAY_MAINMENU
277 || !audio_status())
278 return GO_TO_ROOT;
280 /* track might have changed */
281 update_track = true;
283 #if LCD_DEPTH > 1
284 show_wps_backdrop();
285 #endif
286 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
287 show_remote_wps_backdrop();
288 #endif
289 restore = true;
290 break;
292 case ACTION_WPS_BROWSE:
293 #ifdef HAVE_LCD_CHARCELLS
294 status_set_record(false);
295 status_set_audio(false);
296 #endif
297 FOR_NB_SCREENS(i)
298 gui_wps[i].display->stop_scroll();
299 return GO_TO_PREVIOUS_BROWSER;
300 break;
302 /* play/pause */
303 case ACTION_WPS_PLAY:
304 if (global_settings.party_mode)
305 break;
306 if ( wps_state.paused )
308 wps_state.paused = false;
309 if ( global_settings.fade_on_stop )
310 fade(true, true);
311 else
312 audio_resume();
314 else
316 wps_state.paused = true;
317 if ( global_settings.fade_on_stop )
318 fade(false, true);
319 else
320 audio_pause();
321 settings_save();
322 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
323 call_ata_idle_notifys(true); /* make sure resume info is saved */
324 #endif
326 break;
328 /* volume up */
329 case ACTION_WPS_VOLUP:
331 global_settings.volume++;
332 bool res = false;
333 setvol();
334 FOR_NB_SCREENS(i)
336 if(update_onvol_change(&gui_wps[i]))
337 res = true;
339 if (res) {
340 restore = true;
341 restoretimer = current_tick + HZ;
344 break;
346 /* volume down */
347 case ACTION_WPS_VOLDOWN:
349 global_settings.volume--;
350 setvol();
351 bool res = false;
352 FOR_NB_SCREENS(i)
354 if(update_onvol_change(&gui_wps[i]))
355 res = true;
357 if (res) {
358 restore = true;
359 restoretimer = current_tick + HZ;
362 break;
363 /* fast forward
364 OR next dir if this is straight after ACTION_WPS_SKIPNEXT
365 OR if skip length set, next track if straight after SKIPPREV. */
366 case ACTION_WPS_SEEKFWD:
367 if (global_settings.party_mode)
368 break;
369 if (global_settings.skip_length == 0
370 && current_tick -last_right < HZ)
372 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
374 audio_next();
376 else
378 audio_next_dir();
381 else if (global_settings.skip_length > 0
382 && current_tick -last_left < HZ) {
383 next_track();
384 update_track = true;
386 else ffwd_rew(ACTION_WPS_SEEKFWD);
387 last_right = last_left = 0;
388 break;
389 /* fast rewind
390 OR prev dir if this is straight after ACTION_WPS_SKIPPREV,
391 OR if skip length set, beg of track or prev track if this is
392 straight after SKIPPREV */
393 case ACTION_WPS_SEEKBACK:
394 if (global_settings.party_mode)
395 break;
396 if (global_settings.skip_length == 0
397 && current_tick -last_left < HZ)
399 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
401 if (!wps_state.paused)
402 #if (CONFIG_CODEC == SWCODEC)
403 audio_pre_ff_rewind();
404 #else
405 audio_pause();
406 #endif
407 audio_ff_rewind(0);
409 else
411 audio_prev_dir();
414 else if (global_settings.skip_length > 0
415 && current_tick -last_right < HZ)
417 prev_track(3+global_settings.skip_length*60);
418 update_track = true;
420 else ffwd_rew(ACTION_WPS_SEEKBACK);
421 last_left = last_right = 0;
422 break;
424 /* prev / restart */
425 case ACTION_WPS_SKIPPREV:
426 if (global_settings.party_mode)
427 break;
428 last_left = current_tick;
429 update_track = true;
431 #ifdef AB_REPEAT_ENABLE
432 /* if we're in A/B repeat mode and the current position
433 is past the A marker, jump back to the A marker... */
434 if ( ab_repeat_mode_enabled() )
436 if ( ab_after_A_marker(wps_state.id3->elapsed) )
438 ab_jump_to_A_marker();
439 break;
440 #if (AB_REPEAT_ENABLE == 2)
441 } else {
442 ab_reset_markers();
443 #endif
446 /* ...otherwise, do it normally */
447 #endif
449 if (global_settings.skip_length > 0)
450 play_hop(-1);
451 else prev_track(3);
452 break;
454 /* next
455 OR if skip length set, hop by predetermined amount. */
456 case ACTION_WPS_SKIPNEXT:
457 if (global_settings.party_mode)
458 break;
459 last_right = current_tick;
460 update_track = true;
462 #ifdef AB_REPEAT_ENABLE
463 /* if we're in A/B repeat mode and the current position is
464 before the A marker, jump to the A marker... */
465 if ( ab_repeat_mode_enabled() )
467 if ( ab_before_A_marker(wps_state.id3->elapsed) )
469 ab_jump_to_A_marker();
470 break;
471 #if (AB_REPEAT_ENABLE == 2)
472 } else {
473 ab_reset_markers();
474 #endif
477 /* ...otherwise, do it normally */
478 #endif
480 if (global_settings.skip_length > 0)
481 play_hop(1);
482 else next_track();
483 break;
484 /* next / prev directories */
485 /* and set A-B markers if in a-b mode */
486 case ACTION_WPS_ABSETB_NEXTDIR:
487 if (global_settings.party_mode)
488 break;
489 #if defined(AB_REPEAT_ENABLE)
490 if (ab_repeat_mode_enabled())
492 ab_set_B_marker(wps_state.id3->elapsed);
493 ab_jump_to_A_marker();
494 update_track = true;
496 else
497 #endif
499 if (global_settings.skip_length > 0)
500 next_track();
501 else audio_next_dir();
503 break;
504 case ACTION_WPS_ABSETA_PREVDIR:
505 if (global_settings.party_mode)
506 break;
507 #if defined(AB_REPEAT_ENABLE)
508 if (ab_repeat_mode_enabled())
509 ab_set_A_marker(wps_state.id3->elapsed);
510 else
511 #endif
513 if (global_settings.skip_length > 0)
514 prev_track(3);
515 else audio_prev_dir();
517 break;
518 /* menu key functions */
519 case ACTION_WPS_MENU:
520 FOR_NB_SCREENS(i)
521 gui_wps[i].display->stop_scroll();
522 return GO_TO_ROOT;
523 break;
526 #ifdef HAVE_QUICKSCREEN
527 case ACTION_WPS_QUICKSCREEN:
528 #if LCD_DEPTH > 1
529 show_main_backdrop();
530 #endif
531 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
532 show_remote_main_backdrop();
533 #endif
534 if (quick_screen_quick(button))
535 return SYS_USB_CONNECTED;
536 #if LCD_DEPTH > 1
537 show_wps_backdrop();
538 #endif
539 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
540 show_remote_wps_backdrop();
541 #endif
542 restore = true;
543 break;
544 #endif /* HAVE_QUICKSCREEN */
546 /* screen settings */
547 #ifdef BUTTON_F3
548 case ACTION_F3:
549 #if LCD_DEPTH > 1
550 show_main_backdrop();
551 #endif
552 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
553 show_remote_main_backdrop();
554 #endif
555 if (quick_screen_f3(BUTTON_F3))
556 return SYS_USB_CONNECTED;
557 restore = true;
558 break;
559 #endif /* BUTTON_F3 */
561 /* pitch screen */
562 #ifdef HAVE_PITCHSCREEN
563 case ACTION_WPS_PITCHSCREEN:
564 #if LCD_DEPTH > 1
565 show_main_backdrop();
566 #endif
567 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
568 show_remote_main_backdrop();
569 #endif
570 if (1 == pitch_screen())
571 return SYS_USB_CONNECTED;
572 #if LCD_DEPTH > 1
573 show_wps_backdrop();
574 #endif
575 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
576 show_remote_wps_backdrop();
577 #endif
578 restore = true;
579 break;
580 #endif /* HAVE_PITCHSCREEN */
582 #ifdef AB_REPEAT_ENABLE
583 /* reset A&B markers */
584 case ACTION_WPS_ABRESET:
585 if (ab_repeat_mode_enabled())
587 ab_reset_markers();
588 update_track = true;
590 break;
591 #endif /* AB_REPEAT_ENABLE */
593 /* stop and exit wps */
594 case ACTION_WPS_STOP:
595 if (global_settings.party_mode)
596 break;
597 bookmark = true;
598 exit = true;
599 break;
601 case ACTION_WPS_ID3SCREEN:
602 #if LCD_DEPTH > 1
603 show_main_backdrop();
604 #endif
605 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
606 show_remote_main_backdrop();
607 #endif
608 browse_id3();
609 #if LCD_DEPTH > 1
610 show_wps_backdrop();
611 #endif
612 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
613 show_remote_wps_backdrop();
614 #endif
615 restore = true;
616 break;
618 case ACTION_REDRAW: /* yes are locked, just redraw */
619 restore = true;
620 break;
621 case ACTION_NONE: /* Timeout */
622 update_track = true;
623 ffwd_rew(button); /* hopefully fix the ffw/rwd bug */
624 break;
625 #ifdef HAVE_RECORDING
626 case ACTION_WPS_REC:
627 exit = true;
628 break;
629 #endif
630 case SYS_POWEROFF:
631 #if LCD_DEPTH > 1
632 show_main_backdrop();
633 #endif
634 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
635 show_remote_main_backdrop();
636 #endif
637 default_event_handler(SYS_POWEROFF);
638 break;
640 default:
641 if(default_event_handler(button) == SYS_USB_CONNECTED)
642 return GO_TO_ROOT;
643 update_track = true;
644 break;
647 if (update_track)
649 FOR_NB_SCREENS(i)
651 if(update(&gui_wps[i]))
652 exit = true;
654 update_track = false;
657 if (restore &&
658 ((restoretimer == 0) ||
659 (restoretimer < current_tick)))
661 restore = false;
662 restoretimer = 0;
663 if (gui_wps_display()) {
664 exit = true;
666 else if (wps_state.id3){
667 FOR_NB_SCREENS(i)
668 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);
672 if (exit) {
673 #ifdef HAVE_LCD_CHARCELLS
674 status_set_record(false);
675 status_set_audio(false);
676 #endif
677 if (global_settings.fade_on_stop)
678 fade(false, true);
680 FOR_NB_SCREENS(i)
681 gui_wps[i].display->stop_scroll();
682 if (bookmark)
683 bookmark_autobookmark();
684 audio_stop();
685 #ifdef AB_REPEAT_ENABLE
686 ab_reset_markers();
687 #endif
688 #ifdef HAVE_RECORDING
689 if (button == ACTION_WPS_REC)
690 return GO_TO_RECSCREEN;
691 #endif
692 if (global_settings.browse_current)
693 return GO_TO_PREVIOUS_BROWSER;
694 return GO_TO_PREVIOUS;
697 if ( button )
698 ata_spin();
700 return GO_TO_ROOT; /* unreachable - just to reduce compiler warnings */
703 /* needs checking if needed end*/
705 /* wps_state */
707 static void wps_state_init(void)
709 wps_state.ff_rewind = false;
710 wps_state.paused = false;
711 wps_state.id3 = NULL;
712 wps_state.nid3 = NULL;
713 wps_state.current_track_path[0] = '\0';
716 #if 0
717 /* these are obviously not used? */
719 void wps_state_update_ff_rew(bool ff_rew)
721 wps_state.ff_rewind = ff_rew;
724 void wps_state_update_paused(bool paused)
726 wps_state.paused = paused;
728 void wps_state_update_id3_nid3(struct mp3entry *id3, struct mp3entry *nid3)
730 wps_state.id3 = id3;
731 wps_state.nid3 = nid3;
733 #endif
735 static void wps_state_update_ctp(const char *path)
737 strncpy(wps_state.current_track_path, path,
738 sizeof(wps_state.current_track_path));
739 wps_state.current_track_path[sizeof(wps_state.current_track_path)-1] = '\0';
741 /* wps_state end*/
743 /* initial setup of a wps */
744 static void gui_wps_init(struct gui_wps *gui_wps)
746 gui_wps->data = NULL;
747 gui_wps->display = NULL;
748 gui_wps->statusbar = NULL;
749 /* Currently no seperate wps_state needed/possible
750 so use the only aviable ( "global" ) one */
751 gui_wps->state = &wps_state;
754 /* connects a wps with a format-description of the displayed content */
755 static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data)
757 gui_wps->data = data;
760 /* connects a wps with a screen */
761 static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display)
763 gui_wps->display = display;
766 static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar)
768 gui_wps->statusbar = statusbar;
770 /* gui_wps end */
772 void gui_sync_wps_screen_init(void)
774 int i;
775 FOR_NB_SCREENS(i)
776 gui_wps_set_disp(&gui_wps[i], &screens[i]);
778 #ifdef HAVE_LCD_BITMAP
779 static void statusbar_toggle_handler(void *data)
781 (void)data;
782 int i;
783 bool draw = global_settings.statusbar;
785 FOR_NB_SCREENS(i)
787 struct wps_viewport *vp = &gui_wps[i].data->viewports[0];
788 if (gui_wps[i].data->wps_sb_tag)
789 draw = gui_wps[i].data->show_sb_on_wps;
790 if (!draw)
792 vp->vp.y = 0;
793 vp->vp.height = screens[i].lcdheight;
795 else
797 vp->vp.y = STATUSBAR_HEIGHT;
798 vp->vp.height = screens[i].lcdheight - STATUSBAR_HEIGHT;
802 #endif
804 void gui_sync_wps_init(void)
806 int i;
807 FOR_NB_SCREENS(i)
809 wps_data_init(&wps_datas[i]);
810 #ifdef HAVE_REMOTE_LCD
811 wps_datas[i].remote_wps = (i != 0);
812 #endif
813 gui_wps_init(&gui_wps[i]);
814 gui_wps_set_data(&gui_wps[i], &wps_datas[i]);
815 gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]);
817 #ifdef HAVE_LCD_BITMAP
818 add_event(STATUSBAR_TOGGLE_EVENT, false, statusbar_toggle_handler);
819 #endif
820 #if LCD_DEPTH > 1
821 unload_wps_backdrop();
822 #endif
823 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
824 unload_remote_wps_backdrop();
825 #endif
828 #ifdef HAVE_ALBUMART
829 /* Returns true if at least one of the gui_wps screens has an album art
830 tag in its wps structure */
831 bool gui_sync_wps_uses_albumart(void)
833 int i;
834 FOR_NB_SCREENS(i) {
835 struct gui_wps *gwps = &gui_wps[i];
836 if (gwps->data && (gwps->data->wps_uses_albumart != WPS_ALBUMART_NONE))
837 return true;
839 return false;
841 #endif