From f69d9c8a9508871c93396a4261bcc41a8a3cddc7 Mon Sep 17 00:00:00 2001 From: Paul Sauro Date: Wed, 28 Aug 2024 17:44:16 +0200 Subject: Settings: Add a new option to prevent text scrollings in the home screen This option is especially useful for theme creators that want to create themes with lockscreens. When text is scrolling, it is breaking the lockscreen so setting this option to true prevent this. Text will continue to scroll normally in all other contexts. Change-Id: I194f6837217881d50f567a775b81d0b422caf35c --- firmware/drivers/lcd-scroll.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'firmware/drivers/lcd-scroll.c') diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index 895cf98cba..8ab91ef642 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c @@ -24,6 +24,8 @@ /* This file is meant to be #included by scroll_engine.c (twice if a remote * is present) */ +#include "misc.h" +#include "settings.h" #ifndef LCDFN /* Not compiling for remote - define macros for main LCD. */ #define LCDFN(fn) lcd_ ## fn #define LCDM(ma) LCD_ ## ma @@ -195,8 +197,14 @@ static void LCDFN(scroll_worker)(void) s = &si->scroll[index]; /* check pause */ - if (TIME_BEFORE(current_tick, s->start_tick)) + if (TIME_BEFORE(current_tick, s->start_tick)) { continue; + } + + if (global_settings.disable_mainmenu_scrolling && get_current_activity() == ACTIVITY_MAINMENU) { + // No scrolling on the main menu if disabled (to not break themes with lockscreens) + continue; + } s->start_tick = current_tick; -- cgit v1.2.3