summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-04-16 23:33:19 +0200
committerThomas Martitz <kugel@rockbox.org>2014-01-07 14:13:48 +0100
commitad0985ea1c4841498084dc3bc2158492f207e6fb (patch)
treedafa000805921910f55555e6eed26fad5b9ab589 /firmware/drivers
parent49780944809651f28e8135bf6d67dcd8ceeb2585 (diff)
downloadrockbox-ad0985ea1c4841498084dc3bc2158492f207e6fb.tar.gz
rockbox-ad0985ea1c4841498084dc3bc2158492f207e6fb.zip
lcd-common: Remove support for specifying y_offset from lcd_puts* functions.
This main (and only) purpose for it was to adjust the pixel position of the text in otherwise linebased (scrolling) functions. With pixel-based scrolling this isnt necessary anymore. Change-Id: I2a45b8ca6a3f8f50aa2f6630201b30ce9ddfe043
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 97921c6347..7c5df5a3a8 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -445,7 +445,7 @@ static void LCDFN(putsxyofs_style)(int xpos, int ypos,
445/*** Line oriented text output ***/ 445/*** Line oriented text output ***/
446 446
447static void LCDFN(putsofs_style)(int x, int y, const unsigned char *str, 447static void LCDFN(putsofs_style)(int x, int y, const unsigned char *str,
448 int style, int x_offset, int y_offset) 448 int style, int x_offset)
449{ 449{
450 int xpos, ypos, h; 450 int xpos, ypos, h;
451 if(!str) 451 if(!str)
@@ -463,12 +463,12 @@ static void LCDFN(putsofs_style)(int x, int y, const unsigned char *str,
463 ypos = y; 463 ypos = y;
464 } 464 }
465 LCDFN(scroll_stop_viewport_rect)(current_vp, xpos, ypos, current_vp->width - xpos, h); 465 LCDFN(scroll_stop_viewport_rect)(current_vp, xpos, ypos, current_vp->width - xpos, h);
466 LCDFN(putsxyofs_style)(xpos, ypos+y_offset, str, style, x_offset); 466 LCDFN(putsxyofs_style)(xpos, ypos, str, style, x_offset);
467} 467}
468 468
469void LCDFN(puts)(int x, int y, const unsigned char *str) 469void LCDFN(puts)(int x, int y, const unsigned char *str)
470{ 470{
471 LCDFN(putsofs_style)(x, y, str, STYLE_DEFAULT, 0, 0); 471 LCDFN(putsofs_style)(x, y, str, STYLE_DEFAULT, 0);
472} 472}
473 473
474/* Formatting version of LCDFN(puts) */ 474/* Formatting version of LCDFN(puts) */
@@ -504,7 +504,7 @@ void LCDFN(scroll_fn)(struct scrollinfo* s)
504} 504}
505 505
506static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string, 506static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string,
507 int style, int x_offset, int y_offset, 507 int style, int x_offset,
508 bool linebased, 508 bool linebased,
509 void (*scroll_func)(struct scrollinfo *), 509 void (*scroll_func)(struct scrollinfo *),
510 void *data) 510 void *data)
@@ -521,7 +521,7 @@ static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string,
521 * for find_scrolling_line() to work */ 521 * for find_scrolling_line() to work */
522 cwidth = font_get(current_vp->font)->maxwidth; 522 cwidth = font_get(current_vp->font)->maxwidth;
523 height = font_get(current_vp->font)->height; 523 height = font_get(current_vp->font)->height;
524 y = y * (linebased ? height : 1) + y_offset; 524 y = y * (linebased ? height : 1);
525 x = x * (linebased ? cwidth : 1); 525 x = x * (linebased ? cwidth : 1);
526 width = current_vp->width - x; 526 width = current_vp->width - x;
527 527
@@ -588,13 +588,13 @@ void LCDFN(putsxy_scroll_func)(int x, int y, const unsigned char *string,
588 if (!scroll_func) 588 if (!scroll_func)
589 LCDFN(putsxyofs)(x, y, x_offset, string); 589 LCDFN(putsxyofs)(x, y, x_offset, string);
590 else 590 else
591 LCDFN(puts_scroll_worker)(x, y, string, STYLE_NONE, x_offset, 0, 591 LCDFN(puts_scroll_worker)(x, y, string, STYLE_NONE, x_offset,
592 false, scroll_func, data); 592 false, scroll_func, data);
593} 593}
594 594
595void LCDFN(puts_scroll)(int x, int y, const unsigned char *string) 595void LCDFN(puts_scroll)(int x, int y, const unsigned char *string)
596{ 596{
597 LCDFN(puts_scroll_worker)(x, y, string, STYLE_DEFAULT, 0, 0, 597 LCDFN(puts_scroll_worker)(x, y, string, STYLE_DEFAULT, 0,
598 true, LCDFN(scroll_fn), NULL); 598 true, LCDFN(scroll_fn), NULL);
599} 599}
600 600