summaryrefslogtreecommitdiff
path: root/apps/gui/list.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-10-21 23:11:32 +0200
committerWilliam Wilgus <me.theuser@yahoo.com>2021-11-11 17:31:10 -0500
commitfbf83dc4ce939c06808c874d6ac1cc3926fedd50 (patch)
tree0ee23e943eaa5bf563afc7f2568a0112739a0e81 /apps/gui/list.c
parent30a23fdd6de8fb46e7b1349126a9ae6921cf7555 (diff)
downloadrockbox-fbf83dc4ce939c06808c874d6ac1cc3926fedd50.tar.gz
rockbox-fbf83dc4ce939c06808c874d6ac1cc3926fedd50.zip
Add setting for disabling wrap-around lists
Allows user to decide whether scrolling lists will wrap around to the opposite end after the first or last item has been reached. Change-Id: I22156812cf4c857ddc4b6c48c1cef013b1985260
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r--apps/gui/list.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 640a57fbd3..8ff075da7e 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -686,7 +686,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
686 switch (wrap) 686 switch (wrap)
687 { 687 {
688 case LIST_WRAP_ON: 688 case LIST_WRAP_ON:
689 gui_synclist_limit_scroll(lists, false); 689 gui_synclist_limit_scroll(lists, !global_settings.list_wraparound);
690 break; 690 break;
691 case LIST_WRAP_OFF: 691 case LIST_WRAP_OFF:
692 gui_synclist_limit_scroll(lists, true); 692 gui_synclist_limit_scroll(lists, true);
@@ -697,7 +697,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
697 action == ACTION_LISTTREE_PGUP || 697 action == ACTION_LISTTREE_PGUP ||
698 action == ACTION_LISTTREE_PGDOWN) 698 action == ACTION_LISTTREE_PGDOWN)
699 gui_synclist_limit_scroll(lists, true); 699 gui_synclist_limit_scroll(lists, true);
700 else gui_synclist_limit_scroll(lists, false); 700 else gui_synclist_limit_scroll(lists, !global_settings.list_wraparound);
701 break; 701 break;
702 }; 702 };
703 703
@@ -911,7 +911,7 @@ bool simplelist_show_list(struct simplelist_info *info)
911 struct gui_synclist lists; 911 struct gui_synclist lists;
912 int action, old_line_count = simplelist_line_count; 912 int action, old_line_count = simplelist_line_count;
913 list_get_name *getname; 913 list_get_name *getname;
914 int wrap = LIST_WRAP_UNLESS_HELD; 914 int wrap = global_settings.list_wraparound ? LIST_WRAP_UNLESS_HELD : LIST_WRAP_OFF;
915 if (info->get_name) 915 if (info->get_name)
916 getname = info->get_name; 916 getname = info->get_name;
917 else 917 else