summaryrefslogtreecommitdiffstats
path: root/apps/menus/display_menu.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-09-19 11:38:09 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-10-05 10:22:55 -0400
commitead172c05d57568d201709c5fac77cbb8982bbd0 (patch)
tree10ab4de5bafb8092d1b1a3cd27ca8680cf650def /apps/menus/display_menu.c
parentfe6aa21e9eb88f49005863efd2003d0982920048 (diff)
downloadrockbox-ead172c05d57568d201709c5fac77cbb8982bbd0.tar.gz
rockbox-ead172c05d57568d201709c5fac77cbb8982bbd0.zip
gui: Remove redundant copies of list scrolling settings
gui_list_screen_scroll_step() and gui_list_screen_scroll_out_of_view() just copy the global setting into a local static variable. Since they don't do anything special when the setting changes it's simpler to use the global setting directly. Change-Id: Ib6a7bf4e09b6dabbc1597cf28ddbafc0bc857526
Diffstat (limited to 'apps/menus/display_menu.c')
-rw-r--r--apps/menus/display_menu.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 6ed0f34ab6..7823ba4082 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -332,22 +332,7 @@ MENUITEM_SETTING(list_accel_start_delay,
&global_settings.list_accel_start_delay, NULL);
MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL);
#endif /* HAVE_WHEEL_ACCELERATION */
-static int screenscroll_callback(int action,
- const struct menu_item_ex *this_item,
- struct gui_synclist *this_list)
-{
- (void)this_item;
- (void)this_list;
- switch (action)
- {
- case ACTION_EXIT_MENUITEM:
- gui_list_screen_scroll_out_of_view(global_settings.offset_out_of_view);
- break;
- }
- return action;
-}
-MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view,
- screenscroll_callback);
+MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view, NULL);
MENUITEM_SETTING(screen_scroll_step, &global_settings.screen_scroll_step, NULL);
MENUITEM_SETTING(scroll_paginated, &global_settings.scroll_paginated, NULL);