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.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 96b3447728..d1b2748a60 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -596,23 +596,6 @@ bool gui_synclist_keyclick_callback(int action, void* data)
596} 596}
597#endif 597#endif
598 598
599/*
600 * Magic to make sure the list gets updated correctly if the skin does
601 * something naughty like a full screen update when we are in a button
602 * loop.
603 *
604 * The GUI_EVENT_NEED_UI_UPDATE event is registered for in list_do_action_timeout()
605 * and unregistered in gui_synclict_do_button(). This is done because
606 * if something is using the list UI they *must* be calling those
607 * two functions in the correct order or the list wont work.
608 */
609static struct gui_synclist *current_lists;
610void _lists_uiviewport_update_callback(void *data)
611{
612 (void)data;
613 gui_synclist_draw(current_lists);
614}
615
616bool gui_synclist_do_button(struct gui_synclist * lists, 599bool gui_synclist_do_button(struct gui_synclist * lists,
617 int *actionptr, enum list_wrap wrap) 600 int *actionptr, enum list_wrap wrap)
618{ 601{
@@ -627,8 +610,6 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
627 static int next_item_modifier = 1; 610 static int next_item_modifier = 1;
628 static int last_accel_tick = 0; 611 static int last_accel_tick = 0;
629 612
630 remove_event(GUI_EVENT_NEED_UI_UPDATE, _lists_uiviewport_update_callback);
631
632 if (action != ACTION_TOUCHSCREEN) 613 if (action != ACTION_TOUCHSCREEN)
633 { 614 {
634 if (global_settings.list_accel_start_delay) 615 if (global_settings.list_accel_start_delay)
@@ -791,9 +772,6 @@ int list_do_action_timeout(struct gui_synclist *lists, int timeout)
791/* Returns the lowest of timeout or the delay until a postponed 772/* Returns the lowest of timeout or the delay until a postponed
792 scheduled announcement is due (if any). */ 773 scheduled announcement is due (if any). */
793{ 774{
794 current_lists = lists;
795 add_event(GUI_EVENT_NEED_UI_UPDATE, false,
796 _lists_uiviewport_update_callback);
797 if(lists->scheduled_talk_tick) 775 if(lists->scheduled_talk_tick)
798 { 776 {
799 long delay = lists->scheduled_talk_tick -current_tick +1; 777 long delay = lists->scheduled_talk_tick -current_tick +1;