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.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c
index 7916556dfb..5d66788093 100644
--- a/firmware/drivers/lcd-scroll.c
+++ b/firmware/drivers/lcd-scroll.c
@@ -39,9 +39,7 @@ struct scroll_screen_info LCDFN(scroll_info) =
39 .ticks = 12, 39 .ticks = 12,
40 .delay = HZ/2, 40 .delay = HZ/2,
41 .bidir_limit = 50, 41 .bidir_limit = 50,
42#ifdef HAVE_LCD_BITMAP
43 .step = 6, 42 .step = 6,
44#endif
45}; 43};
46 44
47 45
@@ -100,12 +98,10 @@ void LCDFN(scroll_speed)(int speed)
100 LCDFN(scroll_info).ticks = scroll_tick_table[speed]; 98 LCDFN(scroll_info).ticks = scroll_tick_table[speed];
101} 99}
102 100
103#if defined(HAVE_LCD_BITMAP)
104void LCDFN(scroll_step)(int step) 101void LCDFN(scroll_step)(int step)
105{ 102{
106 LCDFN(scroll_info).step = step; 103 LCDFN(scroll_info).step = step;
107} 104}
108#endif
109 105
110void LCDFN(scroll_delay)(int ms) 106void LCDFN(scroll_delay)(int ms)
111{ 107{
@@ -162,7 +158,6 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
162 158
163 /* Stash and restore these three, so that the scroll_func 159 /* Stash and restore these three, so that the scroll_func
164 * can do whatever it likes without destroying the state */ 160 * can do whatever it likes without destroying the state */
165#ifdef HAVE_LCD_BITMAP
166 unsigned drawmode; 161 unsigned drawmode;
167#if LCD_DEPTH > 1 162#if LCD_DEPTH > 1
168 unsigned fg_pattern, bg_pattern; 163 unsigned fg_pattern, bg_pattern;
@@ -170,18 +165,15 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
170 bg_pattern = s->vp->bg_pattern; 165 bg_pattern = s->vp->bg_pattern;
171#endif 166#endif
172 drawmode = s->vp->drawmode; 167 drawmode = s->vp->drawmode;
173#endif
174 s->scroll_func(s); 168 s->scroll_func(s);
175 169
176 LCDFN(update_viewport_rect)(s->x, s->y, s->width, s->height); 170 LCDFN(update_viewport_rect)(s->x, s->y, s->width, s->height);
177 171
178#ifdef HAVE_LCD_BITMAP
179#if LCD_DEPTH > 1 172#if LCD_DEPTH > 1
180 s->vp->fg_pattern = fg_pattern; 173 s->vp->fg_pattern = fg_pattern;
181 s->vp->bg_pattern = bg_pattern; 174 s->vp->bg_pattern = bg_pattern;
182#endif 175#endif
183 s->vp->drawmode = drawmode; 176 s->vp->drawmode = drawmode;
184#endif
185 177
186 return ended; 178 return ended;
187} 179}
@@ -216,12 +208,7 @@ static void LCDFN(scroll_worker)(void)
216 LCDFN(set_viewport)(s->vp); 208 LCDFN(set_viewport)(s->vp);
217 209
218 makedelay = false; 210 makedelay = false;
219#ifdef HAVE_LCD_BITMAP
220 step = si->step; 211 step = si->step;
221#else
222 step = 1;
223#endif
224
225 212
226 if (s->backward) 213 if (s->backward)
227 s->offset -= step; 214 s->offset -= step;