summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/lcd-bitmap-common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index f3e700a4a1..d8417e13e2 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,
430 xpos = x; 430 xpos = x;
431 ypos = y; 431 ypos = y;
432 } 432 }
433 LCDFN(scroll_stop_viewport_rect)(current_vp, x, y, current_vp->width - x, h); 433 LCDFN(scroll_stop_viewport_rect)(current_vp, xpos, ypos, current_vp->width - xpos, h);
434 LCDFN(putsxyofs_style)(xpos, ypos+y_offset, str, style, h, x_offset); 434 LCDFN(putsxyofs_style)(xpos, ypos+y_offset, str, style, h, x_offset);
435} 435}
436 436
@@ -495,7 +495,7 @@ static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string,
495{ 495{
496 struct scrollinfo* s; 496 struct scrollinfo* s;
497 int width, height; 497 int width, height;
498 int w, h, cwidth, margin; 498 int w, h, cwidth;
499 bool restart; 499 bool restart;
500 500
501 if (!string) 501 if (!string)
@@ -529,8 +529,7 @@ static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string,
529 529
530 /* check if scrolling is actually necessary (consider the actual start 530 /* check if scrolling is actually necessary (consider the actual start
531 * of the line) */ 531 * of the line) */
532 margin = x * linebased ? cwidth : 1; 532 if (width >= w)
533 if (current_vp->width >= margin+w)
534 return; 533 return;
535 534
536 if (restart) { 535 if (restart) {