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 { #endif /* HAVE_LCD_BITMAP */ -#define NEW_CURSOR_CHAR 0x7e -#define OLD_CURSOR_CHAR 0x89 +#define CURSOR_CHAR 0x92 static struct menu menus[MAX_MENUS]; static bool inuse[MAX_MENUS] = { false }; @@ -106,7 +105,7 @@ void put_cursorxy(int x, int y, bool on) lcd_bitmap ( bitmap_icons_6x8[Cursor], xpos, ypos, 4, 8, true); #else - lcd_putc(x, y, has_new_lcd()?NEW_CURSOR_CHAR:OLD_CURSOR_CHAR); + lcd_putc(x, y, CURSOR_CHAR); #endif } 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 @@ #ifdef HAVE_LCD_CHARCELLS -char tree_icons_5x7[LastTreeIcon][8] = -{ - { 0x06, 0x09, 0x09, 0x02, 0x02, 0x00, 0x02, 0x00 }, /* Unknown */ - { 0x07, 0x04, 0x07, 0x04, 0x1c, 0x1c, 0x08, 0x00 }, /* File */ - { 0x0c, 0x13, 0x11, 0x11, 0x11, 0x11, 0x1f, 0x00 }, /* Folder */ - { 0x17, 0x00, 0x17, 0x00, 0x17, 0x00, 0x17, 0x00 }, /* Playlist */ - { 0x01, 0x01, 0x02, 0x02, 0x14, 0x0c, 0x04, 0x00 }, /* WPS */ - { 0x1f, 0x11, 0x1b, 0x15, 0x1b, 0x11, 0x1f, 0x00 }, /* MOD/AJZ */ - { 0x00, 0x1f, 0x15, 0x1f, 0x15, 0x1f, 0x00, 0x00 }, /* Language */ - { 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Text file */ - { 0x0b, 0x10, 0x0b, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Config file */ -}; - #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 @@ #ifdef HAVE_LCD_CHARCELLS enum { - Unknown, File, Folder, Playlist, Wps, Mod_Ajz, Language, Text, Config, - LastTreeIcon + Unknown=0x90, + Folder=0x18, Mod_Ajz, Language, File, Wps, Playlist, Text, Config }; -extern char tree_icons_5x7[LastTreeIcon][8]; - #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) break; #endif default: +#ifdef HAVE_LCD_BITMAP icon_type = 0; +#else + icon_type = Unknown; +#endif } if (icon_type) { @@ -424,8 +428,7 @@ static int showdir(char *path, int start) MARGIN_Y+(i-start)*line_height + offset, 6, 8, true); #else - lcd_define_pattern((i-start)*8,tree_icons_5x7[icon_type],8); - lcd_putc(LINE_X-1, i-start, i-start); + lcd_putc(LINE_X-1, i-start, icon_type); #endif } 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 @@ #define FORMAT_BUFFER_SIZE 300 +#ifdef HAVE_LCD_CHARCELLS +unsigned char wps_progress_pat=0; +#endif + static char format_buffer[FORMAT_BUFFER_SIZE]; static char* format_lines[MAX_LINES]; static unsigned char line_type[MAX_LINES]; @@ -369,7 +373,12 @@ static char* get_tag(struct mp3entry* id3, { case 'b': /* progress bar */ *flags |= WPS_REFRESH_PLAYER_PROGRESS; +#ifdef HAVE_LCD_CHARCELLS + snprintf(buf, buf_size, "%c", wps_progress_pat); + return buf; +#else return "\x01"; +#endif case 'p': /* Playlist Position */ *flags |= WPS_REFRESH_STATIC; @@ -767,8 +776,12 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count) if (!id3) return false; + if (wps_progress_pat==0) + wps_progress_pat=lcd_get_locked_pattern(); + memset(binline, 1, sizeof binline); memset(player_progressbar, 1, sizeof player_progressbar); + if(id3->elapsed >= id3->length) songpos = 0; else @@ -787,7 +800,7 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count) player_progressbar[i] += binline[i*5+j]; } } - lcd_define_pattern(8,player_progressbar,7); + lcd_define_pattern(wps_progress_pat, player_progressbar); return true; } #endif