Prototype declaration strictness fixes.
[Rockbox.git] / apps / gui / gwps.c
blob26d31c65bd08a28bedf679fb90066ef41dad4333
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 Jerome Kuptz
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #include <stdio.h>
20 #include <string.h>
21 #include <stdlib.h>
22 #include "config.h"
24 #include "system.h"
25 #include "file.h"
26 #include "lcd.h"
27 #include "font.h"
28 #include "backlight.h"
29 #include "action.h"
30 #include "kernel.h"
31 #include "filetypes.h"
32 #include "debug.h"
33 #include "sprintf.h"
34 #include "settings.h"
35 #include "gwps.h"
36 #include "gwps-common.h"
37 #include "audio.h"
38 #include "usb.h"
39 #include "status.h"
40 #include "ata.h"
41 #include "screens.h"
42 #include "playlist.h"
43 #ifdef HAVE_LCD_BITMAP
44 #include "icons.h"
45 #include "peakmeter.h"
46 #endif
47 #include "action.h"
48 #include "lang.h"
49 #include "bookmark.h"
50 #include "misc.h"
51 #include "sound.h"
52 #include "onplay.h"
53 #include "abrepeat.h"
54 #include "playback.h"
55 #include "splash.h"
56 #include "cuesheet.h"
57 #include "ata_idle_notify.h"
58 #include "root_menu.h"
59 #include "backdrop.h"
60 #include "quickscreen.h"
62 /* currently only on wps_state is needed */
63 struct wps_state wps_state;
64 struct gui_wps gui_wps[NB_SCREENS];
65 static struct wps_data wps_datas[NB_SCREENS];
67 /* change the path to the current played track */
68 static void wps_state_update_ctp(const char *path);
69 /* initial setup of wps_data */
70 static void wps_state_init(void);
71 /* initial setup of a wps */
72 static void gui_wps_init(struct gui_wps *gui_wps);
73 /* connects a wps with a format-description of the displayed content */
74 static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data);
75 /* connects a wps with a screen */
76 static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display);
77 /* connects a wps with a statusbar*/
78 static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar);
80 #ifdef HAVE_LCD_BITMAP
81 static void gui_wps_set_margin(struct gui_wps *gwps)
83 int offset = 0;
84 struct wps_data *data = gwps->data;
85 if(data->wps_sb_tag && data->show_sb_on_wps)
86 offset = STATUSBAR_HEIGHT;
87 else if ( global_settings.statusbar && !data->wps_sb_tag)
88 offset = STATUSBAR_HEIGHT;
89 gwps->display->setmargins(0, offset);
91 #endif
93 static void prev_track(unsigned skip_thresh)
95 if (!wps_state.id3 || (wps_state.id3->elapsed < skip_thresh*1000)) {
96 audio_prev();
98 else {
99 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
101 curr_cuesheet_skip(-1, wps_state.id3->elapsed);
102 return;
105 if (!wps_state.paused)
106 #if (CONFIG_CODEC == SWCODEC)
107 audio_pre_ff_rewind();
108 #else
109 audio_pause();
110 #endif
112 audio_ff_rewind(0);
114 #if (CONFIG_CODEC != SWCODEC)
115 if (!wps_state.paused)
116 audio_resume();
117 #endif
121 static void next_track(void)
123 /* take care of if we're playing a cuesheet */
124 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
126 if (curr_cuesheet_skip(1, wps_state.id3->elapsed))
128 /* if the result was false, then we really want
129 to skip to the next track */
130 return;
134 audio_next();
138 long gui_wps_show(void)
140 long button = 0;
141 bool restore = false;
142 long restoretimer = 0; /* timer to delay screen redraw temporarily */
143 bool exit = false;
144 bool bookmark = false;
145 bool update_track = false;
146 int i;
147 long last_left = 0, last_right = 0;
149 wps_state_init();
151 #ifdef HAVE_LCD_CHARCELLS
152 status_set_audio(true);
153 status_set_param(false);
154 #else
155 FOR_NB_SCREENS(i)
157 gui_wps_set_margin(&gui_wps[i]);
159 #if LCD_DEPTH > 1
160 show_wps_backdrop();
161 #endif /* LCD_DEPTH > 1 */
162 #endif
164 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
165 show_remote_wps_backdrop();
166 #endif
168 #ifdef AB_REPEAT_ENABLE
169 ab_repeat_init();
170 ab_reset_markers();
171 #endif
173 if(audio_status() & AUDIO_STATUS_PLAY)
175 wps_state.id3 = audio_current_track();
176 wps_state.nid3 = audio_next_track();
177 if (wps_state.id3) {
178 if (gui_wps_display())
179 return 0;
180 FOR_NB_SCREENS(i)
181 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL);
182 wps_state_update_ctp(wps_state.id3->path);
185 restore = true;
187 while ( 1 )
189 bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false;
191 /* did someone else (i.e power thread) change audio pause mode? */
192 if (wps_state.paused != audio_paused) {
193 wps_state.paused = audio_paused;
195 /* if another thread paused audio, we are probably in car mode,
196 about to shut down. lets save the settings. */
197 if (wps_state.paused) {
198 settings_save();
199 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
200 call_ata_idle_notifys(true);
201 #endif
205 #ifdef HAVE_LCD_BITMAP
206 /* when the peak meter is enabled we want to have a
207 few extra updates to make it look smooth. On the
208 other hand we don't want to waste energy if it
209 isn't displayed */
210 bool pm=false;
211 FOR_NB_SCREENS(i)
213 if(gui_wps[i].data->peak_meter_enabled)
214 pm = true;
217 if (pm) {
218 long next_refresh = current_tick;
219 long next_big_refresh = current_tick + HZ / 5;
220 button = BUTTON_NONE;
221 while (TIME_BEFORE(current_tick, next_big_refresh)) {
222 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,TIMEOUT_NOBLOCK);
223 if (button != ACTION_NONE) {
224 break;
226 peak_meter_peek();
227 sleep(0); /* Sleep until end of current tick. */
229 if (TIME_AFTER(current_tick, next_refresh)) {
230 FOR_NB_SCREENS(i)
232 if(gui_wps[i].data->peak_meter_enabled)
233 gui_wps_refresh(&gui_wps[i], 0,
234 WPS_REFRESH_PEAK_METER);
235 next_refresh += HZ / PEAK_METER_FPS;
242 /* The peak meter is disabled
243 -> no additional screen updates needed */
244 else {
245 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
247 #else
248 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
249 #endif
251 /* Exit if audio has stopped playing. This can happen if using the
252 sleep timer with the charger plugged or if starting a recording
253 from F1 */
254 if (!audio_status())
255 exit = true;
256 #ifdef ACTION_WPSAB_SINGLE
257 if (!global_settings.party_mode && ab_repeat_mode_enabled())
259 static int wps_ab_state = 0;
260 if (button == ACTION_WPSAB_SINGLE)
262 switch (wps_ab_state)
264 case 0: /* set the A spot */
265 button = ACTION_WPS_ABSETA_PREVDIR;
266 break;
267 case 1: /* set the B spot */
268 button = ACTION_WPS_ABSETB_NEXTDIR;
269 break;
270 case 2:
271 button = ACTION_WPS_ABRESET;
272 break;
274 wps_ab_state = (wps_ab_state+1) % 3;
277 #endif
278 switch(button)
280 case ACTION_WPS_CONTEXT:
281 #if LCD_DEPTH > 1
282 show_main_backdrop();
283 #endif
284 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
285 show_remote_main_backdrop();
286 #endif
287 /* if music is stopped in the context menu we want to exit the wps */
288 if (onplay(wps_state.id3->path,
289 FILE_ATTR_AUDIO, CONTEXT_WPS) == ONPLAY_MAINMENU
290 || !audio_status())
291 return GO_TO_ROOT;
293 /* track might have changed */
294 update_track = true;
296 #if LCD_DEPTH > 1
297 show_wps_backdrop();
298 #endif
299 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
300 show_remote_wps_backdrop();
301 #endif
302 #ifdef HAVE_LCD_BITMAP
303 FOR_NB_SCREENS(i)
305 gui_wps_set_margin(&gui_wps[i]);
307 #endif
308 restore = true;
309 break;
311 case ACTION_WPS_BROWSE:
312 #ifdef HAVE_LCD_CHARCELLS
313 status_set_record(false);
314 status_set_audio(false);
315 #endif
316 FOR_NB_SCREENS(i)
317 gui_wps[i].display->stop_scroll();
318 return GO_TO_PREVIOUS_BROWSER;
319 break;
321 /* play/pause */
322 case ACTION_WPS_PLAY:
323 if (global_settings.party_mode)
324 break;
325 if ( wps_state.paused )
327 wps_state.paused = false;
328 if ( global_settings.fade_on_stop )
329 fade(1);
330 else
331 audio_resume();
333 else
335 wps_state.paused = true;
336 if ( global_settings.fade_on_stop )
337 fade(0);
338 else
339 audio_pause();
340 settings_save();
341 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
342 call_ata_idle_notifys(true); /* make sure resume info is saved */
343 #endif
345 break;
347 /* volume up */
348 case ACTION_WPS_VOLUP:
350 global_settings.volume++;
351 bool res = false;
352 setvol();
353 FOR_NB_SCREENS(i)
355 if(update_onvol_change(&gui_wps[i]))
356 res = true;
358 if (res) {
359 restore = true;
360 restoretimer = current_tick + HZ;
363 break;
365 /* volume down */
366 case ACTION_WPS_VOLDOWN:
368 global_settings.volume--;
369 setvol();
370 bool res = false;
371 FOR_NB_SCREENS(i)
373 if(update_onvol_change(&gui_wps[i]))
374 res = true;
376 if (res) {
377 restore = true;
378 restoretimer = current_tick + HZ;
381 break;
382 /* fast forward
383 OR next dir if this is straight after ACTION_WPS_SKIPNEXT
384 OR in study mode, next track if straight after SKIPPREV. */
385 case ACTION_WPS_SEEKFWD:
386 if (global_settings.party_mode)
387 break;
388 if (!global_settings.study_mode
389 && current_tick -last_right < HZ)
391 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
393 audio_next();
395 else
397 audio_next_dir();
400 else if(global_settings.study_mode
401 && current_tick -last_left < HZ) {
402 next_track();
403 update_track = true;
405 else ffwd_rew(ACTION_WPS_SEEKFWD);
406 last_right = last_left = 0;
407 break;
408 /* fast rewind
409 OR prev dir if this is straight after ACTION_WPS_SKIPPREV,
410 OR in study mode, beg of track or prev track if this is
411 straight after SKIPPREV */
412 case ACTION_WPS_SEEKBACK:
413 if (global_settings.party_mode)
414 break;
415 if (!global_settings.study_mode
416 && current_tick -last_left < HZ)
418 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
420 if (!wps_state.paused)
421 #if (CONFIG_CODEC == SWCODEC)
422 audio_pre_ff_rewind();
423 #else
424 audio_pause();
425 #endif
426 audio_ff_rewind(0);
428 else
430 audio_prev_dir();
433 else if(global_settings.study_mode
434 && current_tick -last_right < HZ)
436 prev_track(3+global_settings.study_hop_step);
437 update_track = true;
439 else ffwd_rew(ACTION_WPS_SEEKBACK);
440 last_left = last_right = 0;
441 break;
443 /* prev / restart */
444 case ACTION_WPS_SKIPPREV:
445 if (global_settings.party_mode)
446 break;
447 last_left = current_tick;
448 update_track = true;
450 #ifdef AB_REPEAT_ENABLE
451 /* if we're in A/B repeat mode and the current position
452 is past the A marker, jump back to the A marker... */
453 if ( ab_repeat_mode_enabled() )
455 if ( ab_after_A_marker(wps_state.id3->elapsed) )
457 ab_jump_to_A_marker();
458 break;
459 #if (AB_REPEAT_ENABLE == 2)
460 } else {
461 ab_reset_markers();
462 #endif
465 /* ...otherwise, do it normally */
466 #endif
468 if(global_settings.study_mode)
469 play_hop(-1);
470 else prev_track(3);
471 break;
473 /* next
474 OR in study mode, hop by predetermined amount. */
475 case ACTION_WPS_SKIPNEXT:
476 if (global_settings.party_mode)
477 break;
478 last_right = current_tick;
479 update_track = true;
481 #ifdef AB_REPEAT_ENABLE
482 /* if we're in A/B repeat mode and the current position is
483 before the A marker, jump to the A marker... */
484 if ( ab_repeat_mode_enabled() )
486 if ( ab_before_A_marker(wps_state.id3->elapsed) )
488 ab_jump_to_A_marker();
489 break;
490 #if (AB_REPEAT_ENABLE == 2)
491 } else {
492 ab_reset_markers();
493 #endif
496 /* ...otherwise, do it normally */
497 #endif
499 if(global_settings.study_mode)
500 play_hop(1);
501 else next_track();
502 break;
503 /* next / prev directories */
504 /* and set A-B markers if in a-b mode */
505 case ACTION_WPS_ABSETB_NEXTDIR:
506 if (global_settings.party_mode)
507 break;
508 #if defined(AB_REPEAT_ENABLE)
509 if (ab_repeat_mode_enabled())
511 ab_set_B_marker(wps_state.id3->elapsed);
512 ab_jump_to_A_marker();
513 update_track = true;
515 else
516 #endif
518 if(global_settings.study_mode)
519 next_track();
520 else audio_next_dir();
522 break;
523 case ACTION_WPS_ABSETA_PREVDIR:
524 if (global_settings.party_mode)
525 break;
526 #if defined(AB_REPEAT_ENABLE)
527 if (ab_repeat_mode_enabled())
528 ab_set_A_marker(wps_state.id3->elapsed);
529 else
530 #endif
532 if(global_settings.study_mode)
533 prev_track(3);
534 else audio_prev_dir();
536 break;
537 /* menu key functions */
538 case ACTION_WPS_MENU:
539 FOR_NB_SCREENS(i)
540 gui_wps[i].display->stop_scroll();
541 return GO_TO_ROOT;
542 break;
545 #ifdef HAVE_QUICKSCREEN
546 case ACTION_WPS_QUICKSCREEN:
547 #if LCD_DEPTH > 1
548 show_main_backdrop();
549 #endif
550 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
551 show_remote_main_backdrop();
552 #endif
553 if (quick_screen_quick(button))
554 return SYS_USB_CONNECTED;
555 #if LCD_DEPTH > 1
556 show_wps_backdrop();
557 #endif
558 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
559 show_remote_wps_backdrop();
560 #endif
561 #ifdef HAVE_LCD_BITMAP
562 FOR_NB_SCREENS(i)
564 gui_wps_set_margin(&gui_wps[i]);
566 #endif
567 restore = true;
568 break;
569 #endif /* HAVE_QUICKSCREEN */
571 /* screen settings */
572 #ifdef BUTTON_F3
573 case ACTION_F3:
574 #if LCD_DEPTH > 1
575 show_main_backdrop();
576 #endif
577 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
578 show_remote_main_backdrop();
579 #endif
580 if (quick_screen_f3(BUTTON_F3))
581 return SYS_USB_CONNECTED;
582 #ifdef HAVE_LCD_BITMAP
583 FOR_NB_SCREENS(i)
585 gui_wps_set_margin(&gui_wps[i]);
587 #endif
588 restore = true;
589 break;
590 #endif /* BUTTON_F3 */
592 /* pitch screen */
593 #ifdef HAVE_PITCHSCREEN
594 case ACTION_WPS_PITCHSCREEN:
595 #if LCD_DEPTH > 1
596 show_main_backdrop();
597 #endif
598 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
599 show_remote_main_backdrop();
600 #endif
601 if (1 == pitch_screen())
602 return SYS_USB_CONNECTED;
603 #if LCD_DEPTH > 1
604 show_wps_backdrop();
605 #endif
606 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
607 show_remote_wps_backdrop();
608 #endif
609 restore = true;
610 break;
611 #endif /* HAVE_PITCHSCREEN */
613 #ifdef AB_REPEAT_ENABLE
614 /* reset A&B markers */
615 case ACTION_WPS_ABRESET:
616 if (ab_repeat_mode_enabled())
618 ab_reset_markers();
619 update_track = true;
621 break;
622 #endif /* AB_REPEAT_ENABLE */
624 /* stop and exit wps */
625 case ACTION_WPS_STOP:
626 if (global_settings.party_mode)
627 break;
628 bookmark = true;
629 exit = true;
630 break;
632 case ACTION_WPS_ID3SCREEN:
633 #if LCD_DEPTH > 1
634 show_main_backdrop();
635 #endif
636 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
637 show_remote_main_backdrop();
638 #endif
639 browse_id3();
640 #if LCD_DEPTH > 1
641 show_wps_backdrop();
642 #endif
643 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
644 show_remote_wps_backdrop();
645 #endif
646 #ifdef HAVE_LCD_BITMAP
647 FOR_NB_SCREENS(i)
649 gui_wps_set_margin(&gui_wps[i]);
651 #endif
652 restore = true;
653 break;
655 case ACTION_REDRAW: /* yes are locked, just redraw */
656 restore = true;
657 break;
658 case ACTION_NONE: /* Timeout */
659 update_track = true;
660 ffwd_rew(button); /* hopefully fix the ffw/rwd bug */
661 break;
662 #ifdef HAVE_RECORDING
663 case ACTION_WPS_REC:
664 exit = true;
665 break;
666 #endif
667 case SYS_POWEROFF:
668 #if LCD_DEPTH > 1
669 show_main_backdrop();
670 #endif
671 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
672 show_remote_main_backdrop();
673 #endif
674 default_event_handler(SYS_POWEROFF);
675 break;
677 default:
678 if(default_event_handler(button) == SYS_USB_CONNECTED)
679 return GO_TO_ROOT;
680 update_track = true;
681 break;
684 if (update_track)
686 FOR_NB_SCREENS(i)
688 if(update(&gui_wps[i]))
689 exit = true;
691 update_track = false;
694 if (restore &&
695 ((restoretimer == 0) ||
696 (restoretimer < current_tick)))
698 restore = false;
699 restoretimer = 0;
700 if (gui_wps_display()) {
701 exit = true;
703 else if (wps_state.id3){
704 FOR_NB_SCREENS(i)
705 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);
709 if (exit) {
710 #ifdef HAVE_LCD_CHARCELLS
711 status_set_record(false);
712 status_set_audio(false);
713 #endif
714 if (global_settings.fade_on_stop)
715 fade(0);
717 FOR_NB_SCREENS(i)
718 gui_wps[i].display->stop_scroll();
719 if (bookmark)
720 bookmark_autobookmark();
721 audio_stop();
722 #ifdef AB_REPEAT_ENABLE
723 ab_reset_markers();
724 #endif
725 #ifdef HAVE_RECORDING
726 if (button == ACTION_WPS_REC)
727 return GO_TO_RECSCREEN;
728 #endif
729 if (global_settings.browse_current)
730 return GO_TO_PREVIOUS_BROWSER;
731 return GO_TO_PREVIOUS;
734 if ( button )
735 ata_spin();
737 return GO_TO_ROOT; /* unreachable - just to reduce compiler warnings */
740 /* needs checking if needed end*/
742 /* wps_state */
744 static void wps_state_init(void)
746 wps_state.ff_rewind = false;
747 wps_state.paused = false;
748 wps_state.id3 = NULL;
749 wps_state.nid3 = NULL;
750 wps_state.current_track_path[0] = '\0';
753 #if 0
754 /* these are obviously not used? */
756 void wps_state_update_ff_rew(bool ff_rew)
758 wps_state.ff_rewind = ff_rew;
761 void wps_state_update_paused(bool paused)
763 wps_state.paused = paused;
765 void wps_state_update_id3_nid3(struct mp3entry *id3, struct mp3entry *nid3)
767 wps_state.id3 = id3;
768 wps_state.nid3 = nid3;
770 #endif
772 static void wps_state_update_ctp(const char *path)
774 strncpy(wps_state.current_track_path, path,
775 sizeof(wps_state.current_track_path));
776 wps_state.current_track_path[sizeof(wps_state.current_track_path)-1] = '\0';
778 /* wps_state end*/
780 /* initial setup of a wps */
781 static void gui_wps_init(struct gui_wps *gui_wps)
783 gui_wps->data = NULL;
784 gui_wps->display = NULL;
785 gui_wps->statusbar = NULL;
786 /* Currently no seperate wps_state needed/possible
787 so use the only aviable ( "global" ) one */
788 gui_wps->state = &wps_state;
791 /* connects a wps with a format-description of the displayed content */
792 static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data)
794 gui_wps->data = data;
797 /* connects a wps with a screen */
798 static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display)
800 gui_wps->display = display;
803 static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar)
805 gui_wps->statusbar = statusbar;
807 /* gui_wps end */
809 void gui_sync_wps_screen_init(void)
811 int i;
812 FOR_NB_SCREENS(i)
813 gui_wps_set_disp(&gui_wps[i], &screens[i]);
816 void gui_sync_wps_init(void)
818 int i;
819 FOR_NB_SCREENS(i)
821 wps_data_init(&wps_datas[i]);
822 #ifdef HAVE_REMOTE_LCD
823 wps_datas[i].remote_wps = (i != 0);
824 #endif
825 gui_wps_init(&gui_wps[i]);
826 gui_wps_set_data(&gui_wps[i], &wps_datas[i]);
827 gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]);
829 #if LCD_DEPTH > 1
830 unload_wps_backdrop();
831 #endif
832 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
833 unload_remote_wps_backdrop();
834 #endif
837 #ifdef HAVE_ALBUMART
838 /* Returns true if at least one of the gui_wps screens has an album art
839 tag in its wps structure */
840 bool gui_sync_wps_uses_albumart(void)
842 int i;
843 FOR_NB_SCREENS(i) {
844 struct gui_wps *gwps = &gui_wps[i];
845 if (gwps->data && (gwps->data->wps_uses_albumart != WPS_ALBUMART_NONE))
846 return true;
848 return false;
850 #endif