summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2023-12-01 02:06:51 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2023-12-01 13:53:42 -0500
commit8347203dc642de523bf4bbaafd357c7b7c8e8a70 (patch)
tree5765f03cd171e06aa64b86d48c00b58b2163192f /firmware
parent857267e9df26b8fc94f95c106126760a6c03319e (diff)
downloadrockbox-8347203dc642de523bf4bbaafd357c7b7c8e8a70.tar.gz
rockbox-8347203dc642de523bf4bbaafd357c7b7c8e8a70.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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-scroll.c4
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
64 struct scrollinfo *s = &LCDFN(scroll_info).scroll[i]; 64 struct scrollinfo *s = &LCDFN(scroll_info).scroll[i];
65 /* check if the specified area crosses the viewport in some way */ 65 /* check if the specified area crosses the viewport in some way */
66 if (s->vp == vp 66 if (s->vp == vp
67 && (x < (s->x+s->width) && (x+width) >= s->x) 67 && (x < (s->x+s->width) && (x+width) > s->x)
68 && (y < (s->y+s->height) && (y+height) >= s->y)) 68 && (y < (s->y+s->height) && (y+height) > s->y))
69 { 69 {
70 /* inform scroller about end of scrolling */ 70 /* inform scroller about end of scrolling */
71 s->line = NULL; 71 s->line = NULL;