diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 12 | ||||
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 8 |
2 files changed, 3 insertions, 17 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index bd6efa167c..cc42248b2d 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c | |||
@@ -271,18 +271,6 @@ struct viewport* LCDFN(set_viewport)(struct viewport* vp) | |||
271 | return LCDFN(set_viewport_ex)(vp, VP_FLAG_VP_DIRTY); | 271 | return LCDFN(set_viewport_ex)(vp, VP_FLAG_VP_DIRTY); |
272 | } | 272 | } |
273 | 273 | ||
274 | struct viewport *LCDFN(get_viewport)(bool *is_default) | ||
275 | { | ||
276 | #if 0 | ||
277 | *is_default = memcmp(LCDFN(current_viewport), | ||
278 | &default_vp, sizeof(struct viewport)) == 0; | ||
279 | #else | ||
280 | *is_default = LCDFN(current_viewport) == &default_vp; | ||
281 | #endif | ||
282 | |||
283 | return LCDFN(current_viewport); | ||
284 | } | ||
285 | |||
286 | void LCDFN(update_viewport)(void) | 274 | void LCDFN(update_viewport)(void) |
287 | { | 275 | { |
288 | 276 | ||
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index d8bfd72dde..dfdf78ecda 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c | |||
@@ -185,10 +185,9 @@ static void LCDFN(scroll_worker)(void) | |||
185 | { | 185 | { |
186 | int index; | 186 | int index; |
187 | bool makedelay; | 187 | bool makedelay; |
188 | bool is_default; | ||
189 | struct scroll_screen_info *si = &LCDFN(scroll_info); | 188 | struct scroll_screen_info *si = &LCDFN(scroll_info); |
190 | struct scrollinfo *s; | 189 | struct scrollinfo *s; |
191 | struct viewport *vp; | 190 | struct viewport *oldvp; |
192 | int step; | 191 | int step; |
193 | 192 | ||
194 | for ( index = 0; index < si->lines; index++ ) | 193 | for ( index = 0; index < si->lines; index++ ) |
@@ -206,8 +205,7 @@ static void LCDFN(scroll_worker)(void) | |||
206 | * is unaware of the swapped viewports. the vp must | 205 | * is unaware of the swapped viewports. the vp must |
207 | * be switched early so that lcd_getstringsize() picks the | 206 | * be switched early so that lcd_getstringsize() picks the |
208 | * correct font */ | 207 | * correct font */ |
209 | vp = LCDFN(get_viewport)(&is_default); | 208 | oldvp = LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ |
210 | LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ | ||
211 | 209 | ||
212 | makedelay = false; | 210 | makedelay = false; |
213 | step = si->step; | 211 | step = si->step; |
@@ -220,7 +218,7 @@ static void LCDFN(scroll_worker)(void) | |||
220 | /* put the line onto the display now */ | 218 | /* put the line onto the display now */ |
221 | makedelay = LCDFN(scroll_now(s)); | 219 | makedelay = LCDFN(scroll_now(s)); |
222 | 220 | ||
223 | LCDFN(set_viewport_ex)(vp, 0); /* don't mark the last vp as dirty */ | 221 | LCDFN(set_viewport_ex)(oldvp, 0); /* don't mark the last vp as dirty */ |
224 | 222 | ||
225 | if (makedelay) | 223 | if (makedelay) |
226 | s->start_tick += si->delay + si->ticks; | 224 | s->start_tick += si->delay + si->ticks; |