diff options
author | Paul Sauro <olsroparadise@proton.me> | 2024-08-28 17:44:16 +0200 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2024-08-28 20:24:44 -0400 |
commit | f69d9c8a9508871c93396a4261bcc41a8a3cddc7 (patch) | |
tree | 8c8968007ea27e847e39edfd1f4459bc255bc3fe /firmware/drivers | |
parent | f6b9e923dc6b2601e9e6190fd887d5b5277b2b59 (diff) | |
download | rockbox-f69d9c8a9508871c93396a4261bcc41a8a3cddc7.tar.gz rockbox-f69d9c8a9508871c93396a4261bcc41a8a3cddc7.zip |
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
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 @@ | |||
24 | /* This file is meant to be #included by scroll_engine.c (twice if a remote | 24 | /* This file is meant to be #included by scroll_engine.c (twice if a remote |
25 | * is present) */ | 25 | * is present) */ |
26 | 26 | ||
27 | #include "misc.h" | ||
28 | #include "settings.h" | ||
27 | #ifndef LCDFN /* Not compiling for remote - define macros for main LCD. */ | 29 | #ifndef LCDFN /* Not compiling for remote - define macros for main LCD. */ |
28 | #define LCDFN(fn) lcd_ ## fn | 30 | #define LCDFN(fn) lcd_ ## fn |
29 | #define LCDM(ma) LCD_ ## ma | 31 | #define LCDM(ma) LCD_ ## ma |
@@ -195,8 +197,14 @@ static void LCDFN(scroll_worker)(void) | |||
195 | s = &si->scroll[index]; | 197 | s = &si->scroll[index]; |
196 | 198 | ||
197 | /* check pause */ | 199 | /* check pause */ |
198 | if (TIME_BEFORE(current_tick, s->start_tick)) | 200 | if (TIME_BEFORE(current_tick, s->start_tick)) { |
199 | continue; | 201 | continue; |
202 | } | ||
203 | |||
204 | if (global_settings.disable_mainmenu_scrolling && get_current_activity() == ACTIVITY_MAINMENU) { | ||
205 | // No scrolling on the main menu if disabled (to not break themes with lockscreens) | ||
206 | continue; | ||
207 | } | ||
200 | 208 | ||
201 | s->start_tick = current_tick; | 209 | s->start_tick = current_tick; |
202 | 210 | ||