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) return LCDFN(set_viewport_ex)(vp, VP_FLAG_VP_DIRTY); } -struct viewport *LCDFN(get_viewport)(bool *is_default) -{ -#if 0 - *is_default = memcmp(LCDFN(current_viewport), - &default_vp, sizeof(struct viewport)) == 0; -#else - *is_default = LCDFN(current_viewport) == &default_vp; -#endif - - return LCDFN(current_viewport); -} - void LCDFN(update_viewport)(void) { 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) { int index; bool makedelay; - bool is_default; struct scroll_screen_info *si = &LCDFN(scroll_info); struct scrollinfo *s; - struct viewport *vp; + struct viewport *oldvp; int step; for ( index = 0; index < si->lines; index++ ) @@ -206,8 +205,7 @@ static void LCDFN(scroll_worker)(void) * is unaware of the swapped viewports. the vp must * be switched early so that lcd_getstringsize() picks the * correct font */ - vp = LCDFN(get_viewport)(&is_default); - LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ + oldvp = LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ makedelay = false; step = si->step; @@ -220,7 +218,7 @@ static void LCDFN(scroll_worker)(void) /* put the line onto the display now */ makedelay = LCDFN(scroll_now(s)); - LCDFN(set_viewport_ex)(vp, 0); /* don't mark the last vp as dirty */ + LCDFN(set_viewport_ex)(oldvp, 0); /* don't mark the last vp as dirty */ if (makedelay) s->start_tick += si->delay + si->ticks; diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index 91f9d1f868..913b4778a7 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c @@ -37,14 +37,6 @@ #endif #include "scroll_engine.h" - -/* private helper function for the scroll engine. Do not use in apps/. - * defined in lcd-bitmap-common.c */ -extern struct viewport *lcd_get_viewport(bool *is_defaut); -#ifdef HAVE_REMOTE_LCD -extern struct viewport *lcd_remote_get_viewport(bool *is_defaut); -#endif - static const char scroll_tick_table[18] = { /* Hz values [f(x)=100.8/(x+.048)]: 1, 1.25, 1.55, 2, 2.5, 3.12, 4, 5, 6.25, 8.33, 10, 12.5, 16.7, 20, 25, 33, 49.2, 96.2 */