A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

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

authored by

Paul Sauro and committed by
William Wilgus
f69d9c8a f6b9e923

+44 -2
+14
apps/lang/english.lang
··· 16498 16498 </voice> 16499 16499 </phrase> 16500 16500 <phrase> 16501 + id: LANG_DISABLE_MAINMENU_SCROLLING 16502 + desc: Disable main menu scrolling 16503 + user: core 16504 + <source> 16505 + *: "Disable main menu scrolling" 16506 + </source> 16507 + <dest> 16508 + *: "Disable main menu scrolling" 16509 + </dest> 16510 + <voice> 16511 + *: "Disable main menu scrolling" 16512 + </voice> 16513 + </phrase> 16514 + <phrase> 16501 16515 id: LANG_REMAINING 16502 16516 desc: Playing Time 16503 16517 user: core
+14
apps/lang/francais.lang
··· 15080 15080 *: "Français" 15081 15081 </voice> 15082 15082 </phrase> 15083 + <phrase> 15084 + id: LANG_DISABLE_MAINMENU_SCROLLING 15085 + desc: Disable main menu scrolling 15086 + user: core 15087 + <source> 15088 + *: "Disable main menu scrolling" 15089 + </source> 15090 + <dest> 15091 + *: "Désactiver défilement dans le menu principal" 15092 + </dest> 15093 + <voice> 15094 + *: "Désactiver défilement dans le menu principal" 15095 + </voice> 15096 + </phrase>
+4 -1
apps/menus/display_menu.c
··· 331 331 MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL); 332 332 #endif /* HAVE_WHEEL_ACCELERATION */ 333 333 MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view, NULL); 334 + MENUITEM_SETTING(disable_mainmenu_scrolling, &global_settings.disable_mainmenu_scrolling, NULL); 334 335 MENUITEM_SETTING(screen_scroll_step, &global_settings.screen_scroll_step, NULL); 335 336 MENUITEM_SETTING(scroll_paginated, &global_settings.scroll_paginated, NULL); 336 337 MENUITEM_SETTING(list_wraparound, &global_settings.list_wraparound, NULL); ··· 343 344 #ifdef HAVE_REMOTE_LCD 344 345 &remote_scroll_sets, 345 346 #endif 346 - &offset_out_of_view, &screen_scroll_step, 347 + &offset_out_of_view, 348 + &disable_mainmenu_scrolling, 349 + &screen_scroll_step, 347 350 &scroll_paginated, 348 351 &list_wraparound, 349 352 &list_order,
+1
apps/settings.h
··· 686 686 int screen_scroll_step; 687 687 int show_path_in_browser; /* 0=off, 1=current directory, 2=full path */ 688 688 bool offset_out_of_view; 689 + bool disable_mainmenu_scrolling; 689 690 unsigned char icon_file[MAX_FILENAME+1]; 690 691 unsigned char viewers_icon_file[MAX_FILENAME+1]; 691 692 unsigned char font_file[MAX_FILENAME+1]; /* last font */
+2
apps/settings_list.c
··· 1319 1319 #endif 1320 1320 OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW, 1321 1321 false, "Screen Scrolls Out Of View", NULL), 1322 + OFFON_SETTING(0, disable_mainmenu_scrolling, LANG_DISABLE_MAINMENU_SCROLLING, 1323 + false, "Disable main menu scrolling", NULL), 1322 1324 INT_SETTING(F_PADTITLE, scroll_step, LANG_SCROLL_STEP, 6, "scroll step", 1323 1325 UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, lcd_scroll_step), 1324 1326 INT_SETTING(F_PADTITLE, screen_scroll_step, LANG_SCREEN_SCROLL_STEP, 16,
+9 -1
firmware/drivers/lcd-scroll.c
··· 24 24 /* This file is meant to be #included by scroll_engine.c (twice if a remote 25 25 * is present) */ 26 26 27 + #include "misc.h" 28 + #include "settings.h" 27 29 #ifndef LCDFN /* Not compiling for remote - define macros for main LCD. */ 28 30 #define LCDFN(fn) lcd_ ## fn 29 31 #define LCDM(ma) LCD_ ## ma ··· 195 197 s = &si->scroll[index]; 196 198 197 199 /* check pause */ 198 - if (TIME_BEFORE(current_tick, s->start_tick)) 200 + if (TIME_BEFORE(current_tick, s->start_tick)) { 199 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 209 s->start_tick = current_tick; 202 210