diff options
Diffstat (limited to 'firmware')
| -rw-r--r-- | firmware/drivers/lcd-16bit.c | 9 | ||||
| -rw-r--r-- | firmware/export/lcd-remote.h | 4 | ||||
| -rw-r--r-- | firmware/export/lcd.h | 6 |
3 files changed, 12 insertions, 7 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 44e42ad..16c97c9 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c @@ -807,6 +807,7 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, { int xpos,ypos,w,h,xrect; int lastmode = drawmode; + int oldcolor = fg_pattern; /* make sure scrolling is turned off on the line we are updating */ scrolling_lines &= ~(1 << y); @@ -819,11 +820,15 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, ypos = ymargin + y*h; drawmode = (style & STYLE_INVERT) ? (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; + if (drawmode == DRMODE_SOLID && style & STYLE_COLORED) { + fg_pattern = style & STYLE_COLOR_MASK; + } lcd_putsxyofs(xpos, ypos, offset, str); drawmode ^= DRMODE_INVERSEVID; xrect = xpos + MAX(w - offset, 0); lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h); drawmode = lastmode; + fg_pattern = oldcolor; } /*** scrolling ***/ @@ -896,10 +901,8 @@ void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, s->invert = false; if (style & STYLE_INVERT) { s->invert = true; - lcd_puts_style_offset(x,y,string,STYLE_INVERT,offset); } - else - lcd_puts_offset(x,y,string,offset); + lcd_puts_style_offset(x,y,string,style,offset); lcd_getstringsize(string, &w, &h); diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h index ad311a8..cfb643f 100644 --- a/firmware/export/lcd-remote.h +++ b/firmware/export/lcd-remote.h @@ -43,8 +43,8 @@ int remote_type(void); extern struct event_queue remote_scroll_queue; #endif -#define STYLE_DEFAULT 0 -#define STYLE_INVERT 1 +#define STYLE_DEFAULT 0x00000000 +#define STYLE_INVERT 0x20000000 #if LCD_REMOTE_DEPTH <= 8 #if (LCD_REMOTE_PIXELFORMAT == VERTICAL_INTERLEAVED) \ diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 0776640..cebcf54 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -24,8 +24,10 @@ #include "cpu.h" #include "config.h" -#define STYLE_DEFAULT 0 -#define STYLE_INVERT 1 +#define STYLE_DEFAULT 0x00000000 +#define STYLE_INVERT 0x20000000 +#define STYLE_COLORED 0x10000000 +#define STYLE_COLOR_MASK 0x0000FFFF #ifdef SIMULATOR #ifndef MAX_PATH |