summaryrefslogtreecommitdiff
path: root/apps/gui/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r--apps/gui/list.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 652279a9de..85046ead54 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -577,7 +577,7 @@ bool gui_synclist_keyclick_callback(int action, void* data)
577 return false; 577 return false;
578 } 578 }
579 579
580 return action != ACTION_NONE; 580 return action != ACTION_NONE && !IS_SYSEVENT(action);
581} 581}
582 582
583/* 583/*
@@ -611,6 +611,9 @@ bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr)
611 static int next_item_modifier = 1; 611 static int next_item_modifier = 1;
612 static int last_accel_tick = 0; 612 static int last_accel_tick = 0;
613 613
614 if (IS_SYSEVENT(action))
615 return false;
616
614 if (action != ACTION_TOUCHSCREEN) 617 if (action != ACTION_TOUCHSCREEN)
615 { 618 {
616 if (global_settings.list_accel_start_delay) 619 if (global_settings.list_accel_start_delay)
@@ -647,13 +650,8 @@ bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr)
647 /* Disable the skin redraw callback */ 650 /* Disable the skin redraw callback */
648 current_lists = NULL; 651 current_lists = NULL;
649 652
650 /* Prevent list wraparound by repeating actions */ 653 /* repeat actions block list wraparound */
651 bool allow_wrap = lists->wraparound; 654 bool allow_wrap = lists->wraparound;
652 if (action == ACTION_STD_PREVREPEAT ||
653 action == ACTION_STD_NEXTREPEAT ||
654 action == ACTION_LISTTREE_PGUP ||
655 action == ACTION_LISTTREE_PGDOWN)
656 allow_wrap = false;
657 655
658 switch (action) 656 switch (action)
659 { 657 {
@@ -669,8 +667,11 @@ bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr)
669 adjust_volume(-1); 667 adjust_volume(-1);
670 return true; 668 return true;
671#endif 669#endif
672 case ACTION_STD_PREV:
673 case ACTION_STD_PREVREPEAT: 670 case ACTION_STD_PREVREPEAT:
671 allow_wrap = false; /* Prevent list wraparound on repeating actions */
672 /*Fallthrough*/
673 case ACTION_STD_PREV:
674
674 gui_list_select_at_offset(lists, -next_item_modifier, allow_wrap); 675 gui_list_select_at_offset(lists, -next_item_modifier, allow_wrap);
675#ifndef HAVE_WHEEL_ACCELERATION 676#ifndef HAVE_WHEEL_ACCELERATION
676 if (button_queue_count() < FRAMEDROP_TRIGGER) 677 if (button_queue_count() < FRAMEDROP_TRIGGER)
@@ -680,8 +681,10 @@ bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr)
680 *actionptr = ACTION_STD_PREV; 681 *actionptr = ACTION_STD_PREV;
681 return true; 682 return true;
682 683
683 case ACTION_STD_NEXT:
684 case ACTION_STD_NEXTREPEAT: 684 case ACTION_STD_NEXTREPEAT:
685 allow_wrap = false; /* Prevent list wraparound on repeating actions */
686 /*Fallthrough*/
687 case ACTION_STD_NEXT:
685 gui_list_select_at_offset(lists, next_item_modifier, allow_wrap); 688 gui_list_select_at_offset(lists, next_item_modifier, allow_wrap);
686#ifndef HAVE_WHEEL_ACCELERATION 689#ifndef HAVE_WHEEL_ACCELERATION
687 if (button_queue_count() < FRAMEDROP_TRIGGER) 690 if (button_queue_count() < FRAMEDROP_TRIGGER)
@@ -733,7 +736,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr)
733 SCREEN_REMOTE : 736 SCREEN_REMOTE :
734#endif 737#endif
735 SCREEN_MAIN; 738 SCREEN_MAIN;
736 gui_synclist_select_previous_page(lists, screen, allow_wrap); 739 gui_synclist_select_previous_page(lists, screen, false);
737 gui_synclist_draw(lists); 740 gui_synclist_draw(lists);
738 yield(); 741 yield();
739 *actionptr = ACTION_STD_NEXT; 742 *actionptr = ACTION_STD_NEXT;
@@ -748,7 +751,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr)
748 SCREEN_REMOTE : 751 SCREEN_REMOTE :
749#endif 752#endif
750 SCREEN_MAIN; 753 SCREEN_MAIN;
751 gui_synclist_select_next_page(lists, screen, allow_wrap); 754 gui_synclist_select_next_page(lists, screen, false);
752 gui_synclist_draw(lists); 755 gui_synclist_draw(lists);
753 yield(); 756 yield();
754 *actionptr = ACTION_STD_PREV; 757 *actionptr = ACTION_STD_PREV;