forked from len0rd/rockbox
lcd: Fix scrolling.
Change-Id: I1f8d3d67b224c1c531438b94e3aab640b76770be
This commit is contained in:
parent
ca423ed0e3
commit
d2ae832eef
1 changed files with 3 additions and 4 deletions
|
@ -430,7 +430,7 @@ void LCDFN(puts_style_xyoffset)(int x, int y, const unsigned char *str,
|
||||||
xpos = x;
|
xpos = x;
|
||||||
ypos = y;
|
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);
|
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;
|
struct scrollinfo* s;
|
||||||
int width, height;
|
int width, height;
|
||||||
int w, h, cwidth, margin;
|
int w, h, cwidth;
|
||||||
bool restart;
|
bool restart;
|
||||||
|
|
||||||
if (!string)
|
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
|
/* check if scrolling is actually necessary (consider the actual start
|
||||||
* of the line) */
|
* of the line) */
|
||||||
margin = x * linebased ? cwidth : 1;
|
if (width >= w)
|
||||||
if (current_vp->width >= margin+w)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (restart) {
|
if (restart) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue