summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-scroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-scroll.c')
-rw-r--r--firmware/drivers/lcd-scroll.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c
index 5d66788093..d8bfd72dde 100644
--- a/firmware/drivers/lcd-scroll.c
+++ b/firmware/drivers/lcd-scroll.c
@@ -156,8 +156,9 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
156 } 156 }
157 } 157 }
158 158
159 /* Stash and restore these three, so that the scroll_func 159 /* Stash and restore these four, so that the scroll_func
160 * can do whatever it likes without destroying the state */ 160 * can do whatever it likes without destroying the state */
161 struct frame_buffer_t *framebuf = s->vp->buffer;
161 unsigned drawmode; 162 unsigned drawmode;
162#if LCD_DEPTH > 1 163#if LCD_DEPTH > 1
163 unsigned fg_pattern, bg_pattern; 164 unsigned fg_pattern, bg_pattern;
@@ -174,6 +175,7 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
174 s->vp->bg_pattern = bg_pattern; 175 s->vp->bg_pattern = bg_pattern;
175#endif 176#endif
176 s->vp->drawmode = drawmode; 177 s->vp->drawmode = drawmode;
178 s->vp->buffer = framebuf;
177 179
178 return ended; 180 return ended;
179} 181}
@@ -205,7 +207,7 @@ static void LCDFN(scroll_worker)(void)
205 * be switched early so that lcd_getstringsize() picks the 207 * be switched early so that lcd_getstringsize() picks the
206 * correct font */ 208 * correct font */
207 vp = LCDFN(get_viewport)(&is_default); 209 vp = LCDFN(get_viewport)(&is_default);
208 LCDFN(set_viewport)(s->vp); 210 LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */
209 211
210 makedelay = false; 212 makedelay = false;
211 step = si->step; 213 step = si->step;
@@ -218,7 +220,7 @@ static void LCDFN(scroll_worker)(void)
218 /* put the line onto the display now */ 220 /* put the line onto the display now */
219 makedelay = LCDFN(scroll_now(s)); 221 makedelay = LCDFN(scroll_now(s));
220 222
221 LCDFN(set_viewport)(vp); 223 LCDFN(set_viewport_ex)(vp, 0); /* don't mark the last vp as dirty */
222 224
223 if (makedelay) 225 if (makedelay)
224 s->start_tick += si->delay + si->ticks; 226 s->start_tick += si->delay + si->ticks;