diff options
Diffstat (limited to 'firmware/drivers/lcd-scroll.c')
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index d8bfd72dde..26b15732cd 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c @@ -64,8 +64,8 @@ void LCDFN(scroll_stop_viewport_rect)(const struct viewport *vp, int x, int y, i struct scrollinfo *s = &LCDFN(scroll_info).scroll[i]; /* check if the specified area crosses the viewport in some way */ if (s->vp == vp - && (x < (s->x+s->width) && (x+width) >= s->x) - && (y < (s->y+s->height) && (y+height) >= s->y)) + && (x < (s->x+s->width) && (x+width) > s->x) + && (y < (s->y+s->height) && (y+height) > s->y)) { /* inform scroller about end of scrolling */ s->line = NULL; @@ -180,15 +180,14 @@ bool LCDFN(scroll_now)(struct scrollinfo *s) return ended; } -#if !defined(BOOTLOADER) || defined(HAVE_REMOTE_LCD) +#if !defined(BOOTLOADER) static void LCDFN(scroll_worker)(void) { int index; bool makedelay; - bool is_default; struct scroll_screen_info *si = &LCDFN(scroll_info); struct scrollinfo *s; - struct viewport *vp; + struct viewport *oldvp; int step; for ( index = 0; index < si->lines; index++ ) @@ -206,8 +205,7 @@ static void LCDFN(scroll_worker)(void) * is unaware of the swapped viewports. the vp must * be switched early so that lcd_getstringsize() picks the * correct font */ - vp = LCDFN(get_viewport)(&is_default); - LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ + oldvp = LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ makedelay = false; step = si->step; @@ -220,7 +218,7 @@ static void LCDFN(scroll_worker)(void) /* put the line onto the display now */ makedelay = LCDFN(scroll_now(s)); - LCDFN(set_viewport_ex)(vp, 0); /* don't mark the last vp as dirty */ + LCDFN(set_viewport_ex)(oldvp, 0); /* don't mark the last vp as dirty */ if (makedelay) s->start_tick += si->delay + si->ticks; |