diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2006-02-02 19:35:51 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2006-02-02 19:35:51 +0000 |
| commit | 32326ef10d92ffcbf3167bddb0c67e02ed0bd591 (patch) | |
| tree | 7d405feca09ec816e18b919029804f4f7dfdb249 /firmware/drivers/lcd-h100-remote.c | |
| parent | 20debbfa5d2390ea54ff07164f93495766f5828b (diff) | |
| download | rockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.zip rockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.tar.gz rockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.tar.bz2 rockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.tar.xz | |
* Changed implementation of inverse bar: Instead of complementing all pixels after drawing the text, the text is drawn in inversevid mode. This is faster, and will be more readable when backdrop image support gets added. Appearance on non-colour targets doesn't change. * Speedup of the scroll thread.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8532 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-h100-remote.c')
| -rw-r--r-- | firmware/drivers/lcd-h100-remote.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index 3be907a..5d6e044 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c @@ -1167,14 +1167,11 @@ void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str, int st lcd_remote_getstringsize(str, &w, &h); xpos = xmargin + x*w / utf8length((char *)str); ypos = ymargin + y*h; + drawmode = (style & STYLE_INVERT) ? + (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; lcd_remote_putsxyofs(xpos, ypos, offset, str); - drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); + drawmode ^= DRMODE_INVERSEVID; lcd_remote_fillrect(xpos + w, ypos, LCD_REMOTE_WIDTH - (xpos + w), h); - if (style & STYLE_INVERT) - { - drawmode = DRMODE_COMPLEMENT; - lcd_remote_fillrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, h); - } drawmode = lastmode; } @@ -1354,15 +1351,9 @@ static void scroll_thread(void) } lastmode = drawmode; - drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); - lcd_remote_fillrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height); - drawmode = DRMODE_SOLID; - lcd_remote_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line); - if (s->invert) - { - drawmode = DRMODE_COMPLEMENT; - lcd_remote_fillrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height); - } + drawmode = s->invert ? + (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; + lcd_remote_putsxyofs(xpos, ypos, s->offset, s->line); drawmode = lastmode; lcd_remote_update_rect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height); } |