1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 ****************************************************************************/
30 #include "backlight.h"
33 #include "filetypes.h"
38 #include "gwps-common.h"
45 #ifdef HAVE_LCD_BITMAP
47 #include "peakmeter.h"
58 #include "ata_idle_notify.h"
59 #include "root_menu.h"
61 #include "quickscreen.h"
62 #include "pitchscreen.h"
63 #include "appevents.h"
66 #include "option_select.h"
69 #define RESTORE_WPS_INSTANTLY 0l
70 #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick))
72 #define DEFAULT_SKIP_TRESH 3000ul
75 /* currently only one wps_state is needed */
76 struct wps_state wps_state
;
77 struct gui_wps gui_wps
[NB_SCREENS
];
78 static struct wps_data wps_datas
[NB_SCREENS
];
80 /* initial setup of wps_data */
81 static void wps_state_init(void);
82 static void track_changed_callback(void *param
);
83 static void nextid3available_callback(void* param
);
86 #if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD)
87 static void gwps_caption_backlight(struct wps_state
*state
)
89 if (state
&& state
->id3
)
92 if (global_settings
.caption_backlight
)
94 /* turn on backlight n seconds before track ends, and turn it off n
95 seconds into the new track. n == backlight_timeout, or 5s */
96 int n
= global_settings
.backlight_timeout
* 1000;
99 n
= 5000; /* use 5s if backlight is always on or off */
101 if (((state
->id3
->elapsed
< 1000) ||
102 ((state
->id3
->length
- state
->id3
->elapsed
) < (unsigned)n
)) &&
103 (state
->paused
== false))
107 #ifdef HAVE_REMOTE_LCD
108 if (global_settings
.remote_caption_backlight
)
110 /* turn on remote backlight n seconds before track ends, and turn it
111 off n seconds into the new track. n == remote_backlight_timeout,
113 int n
= global_settings
.remote_backlight_timeout
* 1000;
116 n
= 5000; /* use 5s if backlight is always on or off */
118 if (((state
->id3
->elapsed
< 1000) ||
119 ((state
->id3
->length
- state
->id3
->elapsed
) < (unsigned)n
)) &&
120 (state
->paused
== false))
121 remote_backlight_on();
129 static void change_dir(int direction
)
131 if (global_settings
.prevent_skip
)
136 else if (direction
> 0)
138 /* prevent the next dir to immediatly start being ffw'd */
139 action_wait_for_release();
142 static void prev_track(unsigned long skip_thresh
)
144 if (wps_state
.id3
->elapsed
< skip_thresh
)
151 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
153 curr_cuesheet_skip(-1, wps_state
.id3
->elapsed
);
157 if (!wps_state
.paused
)
158 #if (CONFIG_CODEC == SWCODEC)
159 audio_pre_ff_rewind();
166 #if (CONFIG_CODEC != SWCODEC)
167 if (!wps_state
.paused
)
173 static void next_track(void)
175 /* take care of if we're playing a cuesheet */
176 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
178 if (curr_cuesheet_skip(1, wps_state
.id3
->elapsed
))
180 /* if the result was false, then we really want
181 to skip to the next track */
189 static void play_hop(int direction
)
191 unsigned long step
= ((unsigned long)global_settings
.skip_length
)*1000;
192 unsigned long elapsed
= wps_state
.id3
->elapsed
;
193 unsigned long remaining
= wps_state
.id3
->length
- elapsed
;
195 if (!global_settings
.prevent_skip
&&
197 (direction
> 0 && step
>= remaining
) ||
198 (direction
< 0 && elapsed
< DEFAULT_SKIP_TRESH
)))
199 { /* Do normal track skipping */
202 else if (direction
< 0)
203 prev_track(DEFAULT_SKIP_TRESH
);
207 if (direction
== 1 && step
>= remaining
)
209 #if CONFIG_CODEC == SWCODEC
210 if(global_settings
.beep
)
211 pcmbuf_beep(1000, 150, 1500*global_settings
.beep
);
215 else if ((direction
== -1 && elapsed
< step
))
221 elapsed
+= step
* direction
;
223 if((audio_status() & AUDIO_STATUS_PLAY
) && !wps_state
.paused
)
225 #if (CONFIG_CODEC == SWCODEC)
226 audio_pre_ff_rewind();
231 audio_ff_rewind(wps_state
.id3
->elapsed
= elapsed
);
232 #if (CONFIG_CODEC != SWCODEC)
233 if (!wps_state
.paused
)
238 static void gwps_fix_statusbars(void)
240 #ifdef HAVE_LCD_BITMAP
242 wpsbars
= VP_SB_HIDE_ALL
;
246 if (gui_wps
[i
].data
->wps_sb_tag
)
247 draw
= gui_wps
[i
].data
->show_sb_on_wps
;
248 else if (statusbar_position(i
) != STATUSBAR_OFF
)
251 wpsbars
|= (VP_SB_ONSCREEN(i
) | VP_SB_IGNORE_SETTING(i
));
254 wpsbars
= VP_SB_ALLSCREENS
;
258 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
260 * If the user is unable to see the wps, because the display is deactivated,
261 * we surpress updates until the wps is actived again (the lcd driver will
262 * call this hook to issue an instant update)
264 static void wps_lcd_activation_hook(void)
266 wps_state
.do_full_update
= true;
267 /* force timeout in wps main loop, so that the update is instantly */
268 queue_post(&button_queue
, BUTTON_NONE
, 0);
272 static void gwps_leave_wps(void)
274 int i
, oldbars
= VP_SB_HIDE_ALL
;
277 gui_wps
[i
].display
->stop_scroll();
278 if (global_settings
.statusbar
)
279 oldbars
= VP_SB_ALLSCREENS
;
282 show_main_backdrop();
284 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
285 show_remote_main_backdrop();
287 viewportmanager_set_statusbar(oldbars
);
288 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
289 /* Play safe and unregister the hook */
290 lcd_activation_set_hook(NULL
);
294 void gwps_draw_statusbars(void)
296 viewportmanager_set_statusbar(wpsbars
);
298 #ifdef HAVE_TOUCHSCREEN
299 int wps_get_touchaction(struct wps_data
*data
)
303 int type
= action_get_touchscreen_press(&x
, &y
);
305 static int last_action
= ACTION_NONE
;
306 struct touchregion
*r
;
307 bool repeated
= (type
== BUTTON_REPEAT
);
308 bool released
= (type
== BUTTON_REL
);
309 for (i
=0; i
<data
->touchregion_count
; i
++)
311 r
= &data
->touchregion
[i
];
312 /* make sure this region's viewport is visible */
313 if (r
->wvp
->hidden_flags
&VP_DRAW_HIDDEN
)
315 /* reposition the touch inside the viewport */
316 vx
= x
- r
->wvp
->vp
.x
;
317 vy
= y
- r
->wvp
->vp
.y
;
318 /* check if it's inside this viewport */
319 if (vx
>= 0 && vx
< r
->wvp
->vp
.x
+ r
->wvp
->vp
.width
&&
320 vy
>= 0 && vy
< r
->wvp
->vp
.y
+ r
->wvp
->vp
.height
)
322 /* now see if the point is inside this region */
323 if (vx
>= r
->x
&& vx
< r
->x
+r
->width
&&
324 vy
>= r
->y
&& vy
< r
->y
+r
->height
)
326 if ((repeated
&& r
->repeat
) ||
327 (released
&& !r
->repeat
))
329 last_action
= r
->action
;
335 if ((last_action
== ACTION_WPS_SEEKBACK
|| last_action
== ACTION_WPS_SEEKFWD
))
336 return ACTION_WPS_STOPSEEK
;
337 last_action
= ACTION_TOUCHSCREEN
;
338 return ACTION_TOUCHSCREEN
;
341 /* The WPS can be left in two ways:
342 * a) call a function, which draws over the wps. In this case, the wps
343 * will be still active (i.e. the below function didn't return)
344 * b) return with a value evaluated by root_menu.c, in this case the wps
345 * is really left, and root_menu will handle the next screen
347 * In either way, call gwps_leave_wps(), in order to restore the correct
348 * "main screen" backdrops and statusbars
350 long gui_wps_show(void)
354 long restoretimer
= RESTORE_WPS_INSTANTLY
; /* timer to delay screen redraw temporarily */
356 bool bookmark
= false;
359 long last_left
= 0, last_right
= 0;
361 #ifdef HAVE_LCD_CHARCELLS
362 status_set_audio(true);
363 status_set_param(false);
366 #ifdef AB_REPEAT_ENABLE
374 bool audio_paused
= (audio_status() & AUDIO_STATUS_PAUSE
)?true:false;
376 /* did someone else (i.e power thread) change audio pause mode? */
377 if (wps_state
.paused
!= audio_paused
) {
378 wps_state
.paused
= audio_paused
;
380 /* if another thread paused audio, we are probably in car mode,
381 about to shut down. lets save the settings. */
382 if (wps_state
.paused
) {
384 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
385 call_storage_idle_notifys(true);
390 #ifdef HAVE_LCD_BITMAP
391 /* when the peak meter is enabled we want to have a
392 few extra updates to make it look smooth. On the
393 other hand we don't want to waste energy if it
398 if(gui_wps
[i
].data
->peak_meter_enabled
)
403 long next_refresh
= current_tick
;
404 long next_big_refresh
= current_tick
+ HZ
/ 5;
405 button
= BUTTON_NONE
;
406 while (TIME_BEFORE(current_tick
, next_big_refresh
)) {
407 button
= get_action(CONTEXT_WPS
|ALLOW_SOFTLOCK
,TIMEOUT_NOBLOCK
);
408 if (button
!= ACTION_NONE
) {
412 sleep(0); /* Sleep until end of current tick. */
414 if (TIME_AFTER(current_tick
, next_refresh
)) {
417 if(gui_wps
[i
].data
->peak_meter_enabled
)
418 gui_wps_redraw(&gui_wps
[i
], 0,
419 WPS_REFRESH_PEAK_METER
);
420 next_refresh
+= HZ
/ PEAK_METER_FPS
;
427 /* The peak meter is disabled
428 -> no additional screen updates needed */
432 button
= get_action(CONTEXT_WPS
|ALLOW_SOFTLOCK
,
433 restore
? HZ
/100 : HZ
/5);
436 /* Exit if audio has stopped playing. This happens e.g. at end of
437 playlist or if using the sleep timer. */
438 if (!(audio_status() & AUDIO_STATUS_PLAY
))
440 #ifdef HAVE_TOUCHSCREEN
441 if (button
== ACTION_TOUCHSCREEN
)
442 button
= wps_get_touchaction(gui_wps
[SCREEN_MAIN
].data
);
444 /* The iPods/X5/M5 use a single button for the A-B mode markers,
445 defined as ACTION_WPSAB_SINGLE in their config files. */
446 #ifdef ACTION_WPSAB_SINGLE
447 if (!global_settings
.party_mode
&& ab_repeat_mode_enabled())
449 static int wps_ab_state
= 0;
450 if (button
== ACTION_WPSAB_SINGLE
)
452 switch (wps_ab_state
)
454 case 0: /* set the A spot */
455 button
= ACTION_WPS_ABSETA_PREVDIR
;
457 case 1: /* set the B spot */
458 button
= ACTION_WPS_ABSETB_NEXTDIR
;
461 button
= ACTION_WPS_ABRESET
;
464 wps_ab_state
= (wps_ab_state
+1) % 3;
470 case ACTION_WPS_CONTEXT
:
473 /* if music is stopped in the context menu we want to exit the wps */
474 if (onplay(wps_state
.id3
->path
,
475 FILE_ATTR_AUDIO
, CONTEXT_WPS
) == ONPLAY_MAINMENU
482 case ACTION_WPS_BROWSE
:
483 #ifdef HAVE_LCD_CHARCELLS
484 status_set_record(false);
485 status_set_audio(false);
488 return GO_TO_PREVIOUS_BROWSER
;
492 case ACTION_WPS_PLAY
:
493 if (global_settings
.party_mode
)
495 if ( wps_state
.paused
)
497 wps_state
.paused
= false;
498 if ( global_settings
.fade_on_stop
)
505 wps_state
.paused
= true;
506 if ( global_settings
.fade_on_stop
)
511 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
512 call_storage_idle_notifys(true); /* make sure resume info is saved */
517 case ACTION_WPS_VOLUP
:
520 gui_wps
[i
].data
->button_time_volume
= current_tick
;
521 global_settings
.volume
++;
526 if(update_onvol_change(&gui_wps
[i
]))
531 restoretimer
= RESTORE_WPS_NEXT_SECOND
;
535 case ACTION_WPS_VOLDOWN
:
538 gui_wps
[i
].data
->button_time_volume
= current_tick
;
539 global_settings
.volume
--;
544 if(update_onvol_change(&gui_wps
[i
]))
549 restoretimer
= RESTORE_WPS_NEXT_SECOND
;
554 OR next dir if this is straight after ACTION_WPS_SKIPNEXT */
555 case ACTION_WPS_SEEKFWD
:
556 if (global_settings
.party_mode
)
558 if (current_tick
-last_right
< HZ
)
560 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
570 ffwd_rew(ACTION_WPS_SEEKFWD
);
571 last_right
= last_left
= 0;
574 OR prev dir if this is straight after ACTION_WPS_SKIPPREV,*/
575 case ACTION_WPS_SEEKBACK
:
576 if (global_settings
.party_mode
)
578 if (current_tick
-last_left
< HZ
)
580 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
)
582 if (!wps_state
.paused
)
583 #if (CONFIG_CODEC == SWCODEC)
584 audio_pre_ff_rewind();
596 ffwd_rew(ACTION_WPS_SEEKBACK
);
597 last_left
= last_right
= 0;
601 case ACTION_WPS_SKIPPREV
:
602 if (global_settings
.party_mode
)
604 last_left
= current_tick
;
605 #ifdef AB_REPEAT_ENABLE
606 /* if we're in A/B repeat mode and the current position
607 is past the A marker, jump back to the A marker... */
608 if ( ab_repeat_mode_enabled() )
610 if ( ab_after_A_marker(wps_state
.id3
->elapsed
) )
612 ab_jump_to_A_marker();
614 #if (AB_REPEAT_ENABLE == 2)
621 /* ...otherwise, do it normally */
627 OR if skip length set, hop by predetermined amount. */
628 case ACTION_WPS_SKIPNEXT
:
629 if (global_settings
.party_mode
)
631 last_right
= current_tick
;
632 #ifdef AB_REPEAT_ENABLE
633 /* if we're in A/B repeat mode and the current position is
634 before the A marker, jump to the A marker... */
635 if ( ab_repeat_mode_enabled() )
637 if ( ab_before_A_marker(wps_state
.id3
->elapsed
) )
639 ab_jump_to_A_marker();
641 #if (AB_REPEAT_ENABLE == 2)
648 /* ...otherwise, do it normally */
652 /* next / prev directories */
653 /* and set A-B markers if in a-b mode */
654 case ACTION_WPS_ABSETB_NEXTDIR
:
655 if (global_settings
.party_mode
)
657 #if defined(AB_REPEAT_ENABLE)
658 if (ab_repeat_mode_enabled())
660 ab_set_B_marker(wps_state
.id3
->elapsed
);
661 ab_jump_to_A_marker();
669 case ACTION_WPS_ABSETA_PREVDIR
:
670 if (global_settings
.party_mode
)
672 #if defined(AB_REPEAT_ENABLE)
673 if (ab_repeat_mode_enabled())
674 ab_set_A_marker(wps_state
.id3
->elapsed
);
681 /* menu key functions */
682 case ACTION_WPS_MENU
:
688 #ifdef HAVE_QUICKSCREEN
689 case ACTION_WPS_QUICKSCREEN
:
692 if (quick_screen_quick(button
))
693 return SYS_USB_CONNECTED
;
697 #endif /* HAVE_QUICKSCREEN */
699 /* screen settings */
704 if (quick_screen_f3(BUTTON_F3
))
705 return SYS_USB_CONNECTED
;
709 #endif /* BUTTON_F3 */
712 #ifdef HAVE_PITCHSCREEN
713 case ACTION_WPS_PITCHSCREEN
:
716 if (1 == gui_syncpitchscreen_run())
717 return SYS_USB_CONNECTED
;
721 #endif /* HAVE_PITCHSCREEN */
723 #ifdef AB_REPEAT_ENABLE
724 /* reset A&B markers */
725 case ACTION_WPS_ABRESET
:
726 if (ab_repeat_mode_enabled())
732 #endif /* AB_REPEAT_ENABLE */
734 /* stop and exit wps */
735 case ACTION_WPS_STOP
:
736 if (global_settings
.party_mode
)
742 case ACTION_WPS_ID3SCREEN
:
749 #ifdef HAVE_TOUCHSCREEN
750 case ACTION_TOUCH_SHUFFLE
: /* toggle shuffle mode */
752 global_settings
.playlist_shuffle
=
753 !global_settings
.playlist_shuffle
;
754 #if CONFIG_CODEC == SWCODEC
755 dsp_set_replaygain();
757 if (global_settings
.playlist_shuffle
)
758 playlist_randomise(NULL
, current_tick
, true);
760 playlist_sort(NULL
, true);
763 case ACTION_TOUCH_REPMODE
: /* cycle the repeat mode setting */
765 const struct settings_list
*rep_setting
=
766 find_setting(&global_settings
.repeat_mode
, NULL
);
767 option_select_next_val(rep_setting
, false, true);
768 audio_flush_and_reload_tracks();
771 #endif /* HAVE_TOUCHSCREEN */
772 /* this case is used by the softlock feature
773 * it requests a full update here */
775 wps_state
.do_full_update
= true;
777 case ACTION_NONE
: /* Timeout, do a partial update */
779 ffwd_rew(button
); /* hopefully fix the ffw/rwd bug */
781 #ifdef HAVE_RECORDING
787 default_event_handler(SYS_POWEROFF
);
791 if(default_event_handler(button
) == SYS_USB_CONNECTED
)
797 if (wps_state
.do_full_update
|| update
)
799 #if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD)
800 gwps_caption_backlight(&wps_state
);
804 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
806 #ifdef HAVE_REMOTE_LCD
807 /* currently, all remotes are readable without backlight
808 * so still update those */
809 || (i
== SCREEN_REMOTE
)
814 gui_wps_update(&gui_wps
[i
]);
817 wps_state
.do_full_update
= false;
821 if (restore
&& wps_state
.id3
&&
822 ((restoretimer
== RESTORE_WPS_INSTANTLY
) ||
823 TIME_AFTER(current_tick
, restoretimer
)))
826 restoretimer
= RESTORE_WPS_INSTANTLY
;
827 gwps_fix_statusbars();
828 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
829 lcd_activation_set_hook(wps_lcd_activation_hook
);
833 screens
[i
].stop_scroll();
834 gui_wps_display(&gui_wps
[i
]);
839 #ifdef HAVE_LCD_CHARCELLS
840 status_set_record(false);
841 status_set_audio(false);
843 if (global_settings
.fade_on_stop
)
847 bookmark_autobookmark();
849 #ifdef AB_REPEAT_ENABLE
853 #ifdef HAVE_RECORDING
854 if (button
== ACTION_WPS_REC
)
855 return GO_TO_RECSCREEN
;
857 if (global_settings
.browse_current
)
858 return GO_TO_PREVIOUS_BROWSER
;
859 return GO_TO_PREVIOUS
;
862 if (button
&& !IS_SYSEVENT(button
) )
865 return GO_TO_ROOT
; /* unreachable - just to reduce compiler warnings */
868 /* this is called from the playback thread so NO DRAWING! */
869 static void track_changed_callback(void *param
)
871 wps_state
.id3
= (struct mp3entry
*)param
;
872 wps_state
.nid3
= audio_next_track();
874 if (cuesheet_is_enabled() && wps_state
.id3
->cuesheet_type
875 && strcmp(wps_state
.id3
->path
, curr_cue
->audio_filename
))
877 /* the current cuesheet isn't the right one any more */
878 /* We need to parse the new cuesheet */
879 char cuepath
[MAX_PATH
];
881 if (look_for_cuesheet_file(wps_state
.id3
->path
, cuepath
) &&
882 parse_cuesheet(cuepath
, curr_cue
))
884 wps_state
.id3
->cuesheet_type
= 1;
885 strcpy(curr_cue
->audio_filename
, wps_state
.id3
->path
);
888 cue_spoof_id3(curr_cue
, wps_state
.id3
);
890 wps_state
.do_full_update
= true;
892 static void nextid3available_callback(void* param
)
895 wps_state
.nid3
= audio_next_track();
896 wps_state
.do_full_update
= true;
900 static void wps_state_init(void)
902 wps_state
.ff_rewind
= false;
903 wps_state
.paused
= false;
904 if(audio_status() & AUDIO_STATUS_PLAY
)
906 wps_state
.id3
= audio_current_track();
907 wps_state
.nid3
= audio_next_track();
911 wps_state
.id3
= NULL
;
912 wps_state
.nid3
= NULL
;
914 /* We'll be updating due to restore initialized with true */
915 wps_state
.do_full_update
= false;
916 /* add the WPS track event callbacks */
917 add_event(PLAYBACK_EVENT_TRACK_CHANGE
, false, track_changed_callback
);
918 add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE
, false, nextid3available_callback
);
922 #ifdef HAVE_LCD_BITMAP
923 static void statusbar_toggle_handler(void *data
)
927 gwps_fix_statusbars();
931 struct viewport
*vp
= &gui_wps
[i
].data
->viewports
[0].vp
;
932 bool draw
= wpsbars
& (VP_SB_ONSCREEN(i
) | VP_SB_IGNORE_SETTING(i
));
936 vp
->height
= screens
[i
].lcdheight
;
940 bool bar_at_top
= statusbar_position(i
) != STATUSBAR_BOTTOM
;
941 vp
->y
= bar_at_top
?STATUSBAR_HEIGHT
:0;
942 vp
->height
= screens
[i
].lcdheight
- STATUSBAR_HEIGHT
;
948 void gui_sync_wps_init(void)
953 wps_data_init(&wps_datas
[i
]);
955 wps_datas
[i
].wps_uses_albumart
= 0;
957 #ifdef HAVE_REMOTE_LCD
958 wps_datas
[i
].remote_wps
= (i
!= 0);
960 gui_wps
[i
].data
= &wps_datas
[i
];
961 gui_wps
[i
].display
= &screens
[i
];
962 /* Currently no seperate wps_state needed/possible
963 so use the only available ( "global" ) one */
964 gui_wps
[i
].state
= &wps_state
;
966 #ifdef HAVE_LCD_BITMAP
967 add_event(GUI_EVENT_STATUSBAR_TOGGLE
, false, statusbar_toggle_handler
);
970 unload_wps_backdrop();
972 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
973 unload_remote_wps_backdrop();
978 /* Returns true if at least one of the gui_wps screens has an album art
979 tag in its wps structure */
980 bool gui_sync_wps_uses_albumart(void)
984 struct gui_wps
*gwps
= &gui_wps
[i
];
985 if (gwps
->data
&& (gwps
->data
->wps_uses_albumart
!= WPS_ALBUMART_NONE
))