summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-h100-remote.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-02-02 19:35:51 +0000
committerJens Arnold <amiconn@rockbox.org>2006-02-02 19:35:51 +0000
commit32326ef10d92ffcbf3167bddb0c67e02ed0bd591 (patch)
tree7d405feca09ec816e18b919029804f4f7dfdb249 /firmware/drivers/lcd-h100-remote.c
parent20debbfa5d2390ea54ff07164f93495766f5828b (diff)
downloadrockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.tar.gz
rockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.zip
* 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.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c
index 3be907a574..5d6e0441a2 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
1167 lcd_remote_getstringsize(str, &w, &h); 1167 lcd_remote_getstringsize(str, &w, &h);
1168 xpos = xmargin + x*w / utf8length((char *)str); 1168 xpos = xmargin + x*w / utf8length((char *)str);
1169 ypos = ymargin + y*h; 1169 ypos = ymargin + y*h;
1170 drawmode = (style & STYLE_INVERT) ?
1171 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
1170 lcd_remote_putsxyofs(xpos, ypos, offset, str); 1172 lcd_remote_putsxyofs(xpos, ypos, offset, str);
1171 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); 1173 drawmode ^= DRMODE_INVERSEVID;
1172 lcd_remote_fillrect(xpos + w, ypos, LCD_REMOTE_WIDTH - (xpos + w), h); 1174 lcd_remote_fillrect(xpos + w, ypos, LCD_REMOTE_WIDTH - (xpos + w), h);
1173 if (style & STYLE_INVERT)
1174 {
1175 drawmode = DRMODE_COMPLEMENT;
1176 lcd_remote_fillrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, h);
1177 }
1178 drawmode = lastmode; 1175 drawmode = lastmode;
1179} 1176}
1180 1177
@@ -1354,15 +1351,9 @@ static void scroll_thread(void)
1354 } 1351 }
1355 1352
1356 lastmode = drawmode; 1353 lastmode = drawmode;
1357 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); 1354 drawmode = s->invert ?
1358 lcd_remote_fillrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height); 1355 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
1359 drawmode = DRMODE_SOLID; 1356 lcd_remote_putsxyofs(xpos, ypos, s->offset, s->line);
1360 lcd_remote_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line);
1361 if (s->invert)
1362 {
1363 drawmode = DRMODE_COMPLEMENT;
1364 lcd_remote_fillrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height);
1365 }
1366 drawmode = lastmode; 1357 drawmode = lastmode;
1367 lcd_remote_update_rect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height); 1358 lcd_remote_update_rect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height);
1368 } 1359 }