diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-12-01 02:06:51 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2023-12-01 13:53:42 -0500 |
commit | 8347203dc642de523bf4bbaafd357c7b7c8e8a70 (patch) | |
tree | 5765f03cd171e06aa64b86d48c00b58b2163192f | |
parent | 857267e9df26b8fc94f95c106126760a6c03319e (diff) | |
download | rockbox-8347203dc6.tar.gz rockbox-8347203dc6.zip |
[BugFix] scroll_stop_viewport_rect off by 1
when you do the math yes there are 8 slots
between y = 16 and h = 8 and y = 24
16 17 18 19 20 21 22 23
1 2 3 4 5 6 7 8
but 16 + 8 = 24
ah an off by 1 error
Change-Id: I7b0625da1351910b27e5526c0a9f969c067758c6
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index cd8fc4587e..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; |