summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-bitmap-common.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-04-12 07:27:08 +0200
committerThomas Martitz <kugel@rockbox.org>2013-12-14 23:11:31 +0100
commit26801b3bd8f11fe680146086aa0a2fd12e7de289 (patch)
treee9ea482107bf77382a07c842fa7a5f65e4a40ead /firmware/drivers/lcd-bitmap-common.c
parentb094d80dab4f7ac501172d0412e9e53289ede27b (diff)
downloadrockbox-26801b3bd8f11fe680146086aa0a2fd12e7de289.tar.gz
rockbox-26801b3bd8f11fe680146086aa0a2fd12e7de289.zip
scroll_engine: Add STYLE_NONE to allow for drawing lines without styling.
This allows to draw lines without destroying styles that were drawn manually (e.g. from apps/) beforehand. Change-Id: I0de290c9343061efb115e1b76da5b76395c2b2af
Diffstat (limited to 'firmware/drivers/lcd-bitmap-common.c')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 10a567edf1..c04f57ef22 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -360,6 +360,12 @@ static void LCDFN(putsxyofs_style)(int xpos, int ypos,
360 int text_ypos = ypos; 360 int text_ypos = ypos;
361 int line_height = font_get(current_vp->font)->height; 361 int line_height = font_get(current_vp->font)->height;
362 text_ypos += h/2 - line_height/2; /* center the text in the line */ 362 text_ypos += h/2 - line_height/2; /* center the text in the line */
363
364 if ((style & STYLE_MODE_MASK) == STYLE_NONE) {
365 if (str[0])
366 LCDFN(putsxyofs)(xpos, text_ypos, offset, str);
367 return;
368 }
363#if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR) 369#if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR)
364 int oldfgcolor = current_vp->fg_pattern; 370 int oldfgcolor = current_vp->fg_pattern;
365 int oldbgcolor = current_vp->bg_pattern; 371 int oldbgcolor = current_vp->bg_pattern;