diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-10-02 03:30:39 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-10-02 10:31:04 -0400 |
commit | a62fdf4751dd8ac13929039caf46ab7e81a14d51 (patch) | |
tree | 669521a799704f8a63e0c201ccf3fd5536f773f2 /firmware | |
parent | 3a89fdee96eadda10a6024bd1162fae696654ae6 (diff) |
scroll engine, allow clipped text in viewport
loosen the requirements on the scroll viewport allow clipped text
Change-Id: I7099d423ccfbd7bae12e6ba43b8a6b4b864175b7
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 170ad374ea..9a5f865f2a 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -511,9 +511,10 @@ static bool LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string, x = x * (linebased ? cwidth : 1); width = vp->width - x; - if (y >= vp->height || (height + y) > (vp->height)) + if (y >= vp->height) return false; - + if ((height + y) > (vp->height)) + height = vp->height - y; s = find_scrolling_line(x, y); restart = !s; |