summaryrefslogtreecommitdiff
path: root/apps/wps-display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 5ac2aa1f2b..4aca14375d 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -57,6 +57,10 @@
57 57
58#define FORMAT_BUFFER_SIZE 300 58#define FORMAT_BUFFER_SIZE 300
59 59
60#ifdef HAVE_LCD_CHARCELLS
61unsigned char wps_progress_pat=0;
62#endif
63
60static char format_buffer[FORMAT_BUFFER_SIZE]; 64static char format_buffer[FORMAT_BUFFER_SIZE];
61static char* format_lines[MAX_LINES]; 65static char* format_lines[MAX_LINES];
62static unsigned char line_type[MAX_LINES]; 66static unsigned char line_type[MAX_LINES];
@@ -369,7 +373,12 @@ static char* get_tag(struct mp3entry* id3,
369 { 373 {
370 case 'b': /* progress bar */ 374 case 'b': /* progress bar */
371 *flags |= WPS_REFRESH_PLAYER_PROGRESS; 375 *flags |= WPS_REFRESH_PLAYER_PROGRESS;
376#ifdef HAVE_LCD_CHARCELLS
377 snprintf(buf, buf_size, "%c", wps_progress_pat);
378 return buf;
379#else
372 return "\x01"; 380 return "\x01";
381#endif
373 382
374 case 'p': /* Playlist Position */ 383 case 'p': /* Playlist Position */
375 *flags |= WPS_REFRESH_STATIC; 384 *flags |= WPS_REFRESH_STATIC;
@@ -767,8 +776,12 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count)
767 if (!id3) 776 if (!id3)
768 return false; 777 return false;
769 778
779 if (wps_progress_pat==0)
780 wps_progress_pat=lcd_get_locked_pattern();
781
770 memset(binline, 1, sizeof binline); 782 memset(binline, 1, sizeof binline);
771 memset(player_progressbar, 1, sizeof player_progressbar); 783 memset(player_progressbar, 1, sizeof player_progressbar);
784
772 if(id3->elapsed >= id3->length) 785 if(id3->elapsed >= id3->length)
773 songpos = 0; 786 songpos = 0;
774 else 787 else
@@ -787,7 +800,7 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count)
787 player_progressbar[i] += binline[i*5+j]; 800 player_progressbar[i] += binline[i*5+j];
788 } 801 }
789 } 802 }
790 lcd_define_pattern(8,player_progressbar,7); 803 lcd_define_pattern(wps_progress_pat, player_progressbar);
791 return true; 804 return true;
792} 805}
793#endif 806#endif