summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/menu.c5
-rw-r--r--apps/player/icons.c13
-rw-r--r--apps/player/icons.h6
-rw-r--r--apps/tree.c7
-rw-r--r--apps/wps-display.c15
5 files changed, 23 insertions, 23 deletions
diff --git a/apps/menu.c b/apps/menu.c
index e271254412..2a1b595724 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -81,8 +81,7 @@ struct menu {
81 81
82#endif /* HAVE_LCD_BITMAP */ 82#endif /* HAVE_LCD_BITMAP */
83 83
84#define NEW_CURSOR_CHAR 0x7e 84#define CURSOR_CHAR 0x92
85#define OLD_CURSOR_CHAR 0x89
86 85
87static struct menu menus[MAX_MENUS]; 86static struct menu menus[MAX_MENUS];
88static bool inuse[MAX_MENUS] = { false }; 87static bool inuse[MAX_MENUS] = { false };
@@ -106,7 +105,7 @@ void put_cursorxy(int x, int y, bool on)
106 lcd_bitmap ( bitmap_icons_6x8[Cursor], 105 lcd_bitmap ( bitmap_icons_6x8[Cursor],
107 xpos, ypos, 4, 8, true); 106 xpos, ypos, 4, 8, true);
108#else 107#else
109 lcd_putc(x, y, has_new_lcd()?NEW_CURSOR_CHAR:OLD_CURSOR_CHAR); 108 lcd_putc(x, y, CURSOR_CHAR);
110#endif 109#endif
111 } 110 }
112 else { 111 else {
diff --git a/apps/player/icons.c b/apps/player/icons.c
index 15f92bc0b0..3f9b7c1547 100644
--- a/apps/player/icons.c
+++ b/apps/player/icons.c
@@ -21,17 +21,4 @@
21 21
22#ifdef HAVE_LCD_CHARCELLS 22#ifdef HAVE_LCD_CHARCELLS
23 23
24char tree_icons_5x7[LastTreeIcon][8] =
25{
26 { 0x06, 0x09, 0x09, 0x02, 0x02, 0x00, 0x02, 0x00 }, /* Unknown */
27 { 0x07, 0x04, 0x07, 0x04, 0x1c, 0x1c, 0x08, 0x00 }, /* File */
28 { 0x0c, 0x13, 0x11, 0x11, 0x11, 0x11, 0x1f, 0x00 }, /* Folder */
29 { 0x17, 0x00, 0x17, 0x00, 0x17, 0x00, 0x17, 0x00 }, /* Playlist */
30 { 0x01, 0x01, 0x02, 0x02, 0x14, 0x0c, 0x04, 0x00 }, /* WPS */
31 { 0x1f, 0x11, 0x1b, 0x15, 0x1b, 0x11, 0x1f, 0x00 }, /* MOD/AJZ */
32 { 0x00, 0x1f, 0x15, 0x1f, 0x15, 0x1f, 0x00, 0x00 }, /* Language */
33 { 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Text file */
34 { 0x0b, 0x10, 0x0b, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Config file */
35};
36
37#endif 24#endif
diff --git a/apps/player/icons.h b/apps/player/icons.h
index 02293d36fb..1c9c68d66c 100644
--- a/apps/player/icons.h
+++ b/apps/player/icons.h
@@ -25,10 +25,8 @@
25#ifdef HAVE_LCD_CHARCELLS 25#ifdef HAVE_LCD_CHARCELLS
26 26
27enum { 27enum {
28 Unknown, File, Folder, Playlist, Wps, Mod_Ajz, Language, Text, Config, 28 Unknown=0x90,
29 LastTreeIcon 29 Folder=0x18, Mod_Ajz, Language, File, Wps, Playlist, Text, Config
30}; 30};
31 31
32extern char tree_icons_5x7[LastTreeIcon][8];
33
34#endif 32#endif
diff --git a/apps/tree.c b/apps/tree.c
index 37a791c13c..3f666ebfc3 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -411,7 +411,11 @@ static int showdir(char *path, int start)
411 break; 411 break;
412#endif 412#endif
413 default: 413 default:
414#ifdef HAVE_LCD_BITMAP
414 icon_type = 0; 415 icon_type = 0;
416#else
417 icon_type = Unknown;
418#endif
415 } 419 }
416 420
417 if (icon_type) { 421 if (icon_type) {
@@ -424,8 +428,7 @@ static int showdir(char *path, int start)
424 MARGIN_Y+(i-start)*line_height + offset, 428 MARGIN_Y+(i-start)*line_height + offset,
425 6, 8, true); 429 6, 8, true);
426#else 430#else
427 lcd_define_pattern((i-start)*8,tree_icons_5x7[icon_type],8); 431 lcd_putc(LINE_X-1, i-start, icon_type);
428 lcd_putc(LINE_X-1, i-start, i-start);
429#endif 432#endif
430 } 433 }
431 434
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