summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/scroll_engine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 9607c90..2b99c14 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -88,7 +88,11 @@ void lcd_stop_scroll(void)
static bool line_overlaps_viewport(struct viewport *lines_vp, int line,
struct viewport *othervp)
{
+#ifdef HAVE_LCD_BITMAP
int y = (font_get(lines_vp->font)->height*line) + lines_vp->y;
+#else
+ int y = lines_vp->y+line;
+#endif
if (y < othervp->y || y > othervp->y + othervp->height)
return false;
else if ((lines_vp->x + lines_vp->width < othervp->x) ||