diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2013-12-23 20:25:01 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2013-12-23 20:25:34 +0100 |
| commit | d2ae832eef3e91c1a188b697d88ea6cffab0b6bf (patch) | |
| tree | 489735b394396787f032c3b8b90ed67343355c16 /firmware/drivers/lcd-bitmap-common.c | |
| parent | ca423ed0e317645c8febb8dc604743f0fd47139a (diff) | |
| download | rockbox-d2ae832eef3e91c1a188b697d88ea6cffab0b6bf.zip rockbox-d2ae832eef3e91c1a188b697d88ea6cffab0b6bf.tar.gz rockbox-d2ae832eef3e91c1a188b697d88ea6cffab0b6bf.tar.bz2 rockbox-d2ae832eef3e91c1a188b697d88ea6cffab0b6bf.tar.xz | |
lcd: Fix scrolling.
Change-Id: I1f8d3d67b224c1c531438b94e3aab640b76770be
Diffstat (limited to 'firmware/drivers/lcd-bitmap-common.c')
| -rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index f3e700a..d8417e1 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -430,7 +430,7 @@ void LCDFN(puts_style_xyoffset)(int x, int y, const unsigned char *str, xpos = x; ypos = y; } - LCDFN(scroll_stop_viewport_rect)(current_vp, x, y, current_vp->width - x, h); + LCDFN(scroll_stop_viewport_rect)(current_vp, xpos, ypos, current_vp->width - xpos, h); LCDFN(putsxyofs_style)(xpos, ypos+y_offset, str, style, h, x_offset); } @@ -495,7 +495,7 @@ static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string, { struct scrollinfo* s; int width, height; - int w, h, cwidth, margin; + int w, h, cwidth; bool restart; if (!string) @@ -529,8 +529,7 @@ static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string, /* check if scrolling is actually necessary (consider the actual start * of the line) */ - margin = x * linebased ? cwidth : 1; - if (current_vp->width >= margin+w) + if (width >= w) return; if (restart) { |