From d5a081cbd1b871baf4e5d2c276fbabbc30c7994b Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Mon, 19 Sep 2022 12:48:15 +0100 Subject: gui: Remove "enum list_wrap" from list action functions Removing the "list_wrap" argument is actually pretty easy. In practice, almost all lists are using LIST_WRAP_UNLESS_HELD behavior so we can make that the default. A couple of lists disable wraparound with LIST_WRAP_OFF; this is now achieved by setting the list "wraparound" flag to false when setting up the list. LIST_WRAP_ON was unused and is of questionable value, so it has been removed entirely. This makes list wraparound behavior a property of the list, controlled solely by the "wraparound" flag. The result is a simpler list API and implementation, without changing the behavior of any lists. Change-Id: Ib55d17519e6d92fc95ae17b84ab0aaf4233bcb5a --- apps/bookmark.c | 3 +-- apps/cuesheet.c | 2 +- apps/gui/list.c | 39 ++++++++++------------------- apps/gui/list.h | 13 ++-------- apps/gui/option_select.c | 8 ++++-- apps/menu.c | 2 +- apps/onplay.c | 3 +-- apps/playlist_viewer.c | 6 ++--- apps/plugin.h | 7 +++--- apps/plugins/calendar.c | 2 +- apps/plugins/chessbox/chessbox_pgn.c | 3 +-- apps/plugins/keybox.c | 2 +- apps/plugins/keyremap.c | 2 +- apps/plugins/lrcplayer.c | 3 +-- apps/plugins/main_menu_config.c | 2 +- apps/plugins/open_plugins.c | 4 +-- apps/plugins/properties.c | 2 +- apps/plugins/puzzles/rockbox.c | 6 ++--- apps/plugins/random_folder_advance_config.c | 2 +- apps/plugins/rb_info.c | 2 +- apps/plugins/shopper.c | 2 +- apps/plugins/shortcuts/shortcuts_view.c | 7 +----- apps/plugins/text_editor.c | 2 +- apps/radio/presets.c | 3 +-- apps/recorder/recording.c | 2 +- apps/screens.c | 6 ++--- apps/tree.c | 2 +- 27 files changed, 52 insertions(+), 85 deletions(-) (limited to 'apps') diff --git a/apps/bookmark.c b/apps/bookmark.c index 70dbd8075d..d594c51320 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c @@ -793,8 +793,7 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume refresh = false; } - list_do_action(CONTEXT_BOOKMARKSCREEN, HZ / 2, - &list, &action, LIST_WRAP_UNLESS_HELD); + list_do_action(CONTEXT_BOOKMARKSCREEN, HZ / 2, &list, &action); item = gui_synclist_get_sel_pos(&list) / 2; if (bookmarks->show_dont_resume) diff --git a/apps/cuesheet.c b/apps/cuesheet.c index 98040f9992..236d250c69 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c @@ -481,7 +481,7 @@ void browse_cuesheet(struct cuesheet *cue) { gui_synclist_draw(&lists); action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD)) + if (gui_synclist_do_button(&lists, &action)) continue; switch (action) { diff --git a/apps/gui/list.c b/apps/gui/list.c index 713942af18..85404b7f0c 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -595,8 +595,7 @@ static void _lists_uiviewport_update_callback(unsigned short id, void *data) gui_synclist_draw(current_lists); } -bool gui_synclist_do_button(struct gui_synclist * lists, - int *actionptr, enum list_wrap wrap) +bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr) { int action = *actionptr; static bool pgleft_allow_cancel = false; @@ -642,24 +641,15 @@ bool gui_synclist_do_button(struct gui_synclist * lists, /* Disable the skin redraw callback */ current_lists = NULL; - switch (wrap) - { - case LIST_WRAP_ON: - lists->limit_scroll = !lists->wraparound; - break; - case LIST_WRAP_OFF: - lists->limit_scroll = true; - break; - case LIST_WRAP_UNLESS_HELD: - if (action == ACTION_STD_PREVREPEAT || - action == ACTION_STD_NEXTREPEAT || - action == ACTION_LISTTREE_PGUP || - action == ACTION_LISTTREE_PGDOWN) - lists->limit_scroll = true; - else - lists->limit_scroll = !lists->wraparound; - break; - }; + + /* Prevent list wraparound by repeating actions */ + if (action == ACTION_STD_PREVREPEAT || + action == ACTION_STD_NEXTREPEAT || + action == ACTION_LISTTREE_PGUP || + action == ACTION_LISTTREE_PGDOWN) + lists->limit_scroll = true; + else + lists->limit_scroll = !lists->wraparound; switch (action) { @@ -795,8 +785,7 @@ int list_do_action_timeout(struct gui_synclist *lists, int timeout) } bool list_do_action(int context, int timeout, - struct gui_synclist *lists, int *action, - enum list_wrap wrap) + struct gui_synclist *lists, int *action) /* Combines the get_action() (with possibly overridden timeout) and gui_synclist_do_button() calls. Returns the list action from do_button, and places the action from get_action in *action. */ @@ -804,7 +793,7 @@ bool list_do_action(int context, int timeout, timeout = list_do_action_timeout(lists, timeout); keyclick_set_callback(gui_synclist_keyclick_callback, lists); *action = get_action(context, timeout); - return gui_synclist_do_button(lists, action, wrap); + return gui_synclist_do_button(lists, action); } bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, @@ -871,7 +860,6 @@ bool simplelist_show_list(struct simplelist_info *info) struct gui_synclist lists; int action, old_line_count = simplelist_line_count; list_get_name *getname; - int wrap = global_settings.list_wraparound ? LIST_WRAP_UNLESS_HELD : LIST_WRAP_OFF; if (info->get_name) getname = info->get_name; else @@ -914,8 +902,7 @@ bool simplelist_show_list(struct simplelist_info *info) while(1) { - list_do_action(CONTEXT_LIST, info->timeout, - &lists, &action, wrap); + list_do_action(CONTEXT_LIST, info->timeout, &lists, &action); /* We must yield in this case or no other thread can run */ if (info->timeout == TIMEOUT_NOBLOCK) diff --git a/apps/gui/list.h b/apps/gui/list.h index 20410471a2..19f0ccbbff 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h @@ -30,12 +30,6 @@ #define SCROLLBAR_WIDTH global_settings.scrollbar_width -enum list_wrap { - LIST_WRAP_ON = 0, - LIST_WRAP_OFF, - LIST_WRAP_UNLESS_HELD, -}; - enum synclist_cursor { SYNCLIST_CURSOR_NOSTYLE = 0, @@ -238,9 +232,7 @@ extern bool gui_synclist_keyclick_callback(int action, void* data); * returns true if the action was handled. * NOTE: *action may be changed regardless of return value */ -extern bool gui_synclist_do_button(struct gui_synclist * lists, - int *action, - enum list_wrap); +extern bool gui_synclist_do_button(struct gui_synclist * lists, int *action); #if !defined(PLUGIN) struct listitem_viewport_cfg { struct wps_data *data; @@ -283,8 +275,7 @@ extern int list_do_action_timeout(struct gui_synclist *lists, int timeout); list_do_action_timeout) with the gui_synclist_do_button call, for convenience. */ extern bool list_do_action(int context, int timeout, - struct gui_synclist *lists, int *action, - enum list_wrap wrap); + struct gui_synclist *lists, int *action); /** Simplelist implementation. diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 3f110ce526..e154467428 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c @@ -511,9 +511,13 @@ bool option_screen(const struct settings_list *setting, gui_synclist_speak_item(&lists); while (!done) { + /* override user wraparound setting; used mainly by EQ settings. + * Not sure this is justified? */ + if (!allow_wrap) + lists.wraparound = false; + if (list_do_action(CONTEXT_LIST, HZ, /* HZ so the status bar redraws */ - &lists, &action, - allow_wrap? LIST_WRAP_UNLESS_HELD: LIST_WRAP_OFF)) + &lists, &action)) { /* setting changed */ selected = gui_synclist_get_sel_pos(&lists); diff --git a/apps/menu.c b/apps/menu.c index fd3c041e36..85dac8a214 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -450,7 +450,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, action = new_action; } - if (LIKELY(gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD))) + if (LIKELY(gui_synclist_do_button(&lists, &action))) continue; #ifdef HAVE_QUICKSCREEN else if (action == ACTION_STD_QUICKSCREEN) diff --git a/apps/onplay.c b/apps/onplay.c index e44e81ee5d..e4e2a7b3b8 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -429,8 +429,7 @@ static bool playing_time(void) gui_synclist_draw(&pt_lists); gui_synclist_speak_item(&pt_lists); while (true) { - if (list_do_action(CONTEXT_LIST, HZ/2, - &pt_lists, &key, LIST_WRAP_UNLESS_HELD) == 0 + if (list_do_action(CONTEXT_LIST, HZ/2, &pt_lists, &key) == 0 && key!=ACTION_NONE && key!=ACTION_UNKNOWN) { talk_force_shutup(); diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 2f23d87c2b..d2774e67b0 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -844,8 +844,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) } /* Timeout so we can determine if play status has changed */ - bool res = list_do_action(CONTEXT_TREE, HZ/2, - &playlist_lists, &button, LIST_WRAP_UNLESS_HELD); + bool res = list_do_action(CONTEXT_TREE, HZ/2, &playlist_lists, &button); /* during moving, another redraw is going to be needed, * since viewer.selected_track is updated too late (after the first draw) * drawing the moving item needs it */ @@ -1131,8 +1130,7 @@ bool search_playlist(void) gui_synclist_speak_item(&playlist_lists); while (!exit) { - if (list_do_action(CONTEXT_LIST, HZ/4, - &playlist_lists, &button, LIST_WRAP_UNLESS_HELD)) + if (list_do_action(CONTEXT_LIST, HZ/4, &playlist_lists, &button)) continue; switch (button) { diff --git a/apps/plugin.h b/apps/plugin.h index 6bbad26489..0563a8d21f 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -157,12 +157,12 @@ int plugin_open(const char *plugin, const char *parameter); #define PLUGIN_MAGIC 0x526F634B /* RocK */ /* increase this every time the api struct changes */ -#define PLUGIN_API_VERSION 253 +#define PLUGIN_API_VERSION 254 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any new function which are "waiting" at the end of the function table) */ -#define PLUGIN_MIN_API_VERSION 253 +#define PLUGIN_MIN_API_VERSION 254 /* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */ @@ -373,8 +373,7 @@ struct plugin_api { int item_number); void (*gui_synclist_add_item)(struct gui_synclist * lists); void (*gui_synclist_del_item)(struct gui_synclist * lists); - bool (*gui_synclist_do_button)(struct gui_synclist * lists, - int *action, enum list_wrap wrap); + bool (*gui_synclist_do_button)(struct gui_synclist * lists, int *action); void (*gui_synclist_set_title)(struct gui_synclist *lists, const char* title, enum themable_icons icon); enum yesno_res (*gui_syncyesno_run)(const struct text_message * main_message, diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 3299a81273..a70f47c34b 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c @@ -964,7 +964,7 @@ static bool view_events(int selected, struct shown *shown) while (!exit) { button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK); - rb->gui_synclist_do_button(&gui_memos, &button, LIST_WRAP_UNLESS_HELD); + rb->gui_synclist_do_button(&gui_memos, &button); switch (button) { diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index ccbcc7e91d..bb35bec726 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c @@ -686,9 +686,8 @@ struct pgn_game_node* pgn_show_game_list(struct pgn_game_node* first_game){ while (true) { curr_selection = rb->gui_synclist_get_sel_pos(&games_list); button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&games_list,&button,LIST_WRAP_OFF)){ + if (rb->gui_synclist_do_button(&games_list, &button)) continue; - } switch (button) { case ACTION_STD_OK: return get_game_info(curr_selection, first_game); diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index 38783508e7..cb2e23a94a 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c @@ -567,7 +567,7 @@ static int keybox(void) { rb->gui_synclist_draw(&kb_list); button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&kb_list, &button, LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&kb_list, &button)) continue; switch (button) diff --git a/apps/plugins/keyremap.c b/apps/plugins/keyremap.c index aaf530318a..8699d86bd2 100644 --- a/apps/plugins/keyremap.c +++ b/apps/plugins/keyremap.c @@ -2054,7 +2054,7 @@ enum plugin_status plugin_start(const void* parameter) redraw = true; ret = menu_action_cb(&action, selected_item, &exit, &lists); - if (rb->gui_synclist_do_button(&lists,&action,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&lists, &action)) continue; selected_item = rb->gui_synclist_get_sel_pos(&lists); diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index 6c26db7a33..32d001add9 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -2078,8 +2078,7 @@ static int timetag_editor(void) while (!exit) { button = rb->get_action(CONTEXT_TREE, TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&gui_editor, &button, - LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&gui_editor, &button)) continue; switch (button) diff --git a/apps/plugins/main_menu_config.c b/apps/plugins/main_menu_config.c index 9f651094b1..a5488ed2c0 100644 --- a/apps/plugins/main_menu_config.c +++ b/apps/plugins/main_menu_config.c @@ -188,7 +188,7 @@ enum plugin_status plugin_start(const void* parameter) { cur_sel = rb->gui_synclist_get_sel_pos(&list); action = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&list,&action,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&list, &action)) continue; switch (action) diff --git a/apps/plugins/open_plugins.c b/apps/plugins/open_plugins.c index 0bd9740fe7..7230387efb 100644 --- a/apps/plugins/open_plugins.c +++ b/apps/plugins/open_plugins.c @@ -681,7 +681,7 @@ static void edit_menu(int selection) { action = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&lists,&action,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&lists, &action)) continue; selected_item = rb->gui_synclist_get_sel_pos(&lists); switch (action) @@ -864,7 +864,7 @@ reopen_datfile: { action = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&lists,&action,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&lists, &action)) continue; selection = rb->gui_synclist_get_sel_pos(&lists); switch (action) diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 89ea722e9e..ff8c281bed 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c @@ -397,7 +397,7 @@ enum plugin_status plugin_start(const void* parameter) { button = rb->get_action(CONTEXT_LIST, HZ); /* HZ so the status bar redraws corectly */ - if (rb->gui_synclist_do_button(&properties_lists,&button,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&properties_lists, &button)) continue; switch(button) { diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 09b247e184..563820ba23 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c @@ -2458,7 +2458,7 @@ static int list_choose(const char *list_str, const char *title, int sel) { rb->gui_synclist_draw(&list); int button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK); - if(rb->gui_synclist_do_button(&list, &button, LIST_WRAP_UNLESS_HELD)) + if(rb->gui_synclist_do_button(&list, &button)) continue; switch(button) { @@ -2672,7 +2672,7 @@ static bool config_menu(void) { rb->gui_synclist_draw(&list); int button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK); - if(rb->gui_synclist_do_button(&list, &button, LIST_WRAP_UNLESS_HELD)) + if(rb->gui_synclist_do_button(&list, &button)) continue; switch(button) { @@ -2757,7 +2757,7 @@ static int do_preset_menu(struct preset_menu *menu, char *title, int selected) { rb->gui_synclist_draw(&list); int button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK); - if(rb->gui_synclist_do_button(&list, &button, LIST_WRAP_UNLESS_HELD)) + if(rb->gui_synclist_do_button(&list, &button)) continue; switch(button) { diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 2c22298cd4..5688ff93d3 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c @@ -317,7 +317,7 @@ static int edit_list(void) { rb->gui_synclist_draw(&lists); button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&lists,&button,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&lists, &button)) continue; selection = rb->gui_synclist_get_sel_pos(&lists); switch (button) diff --git a/apps/plugins/rb_info.c b/apps/plugins/rb_info.c index 1385a5a9fc..f123a623d2 100644 --- a/apps/plugins/rb_info.c +++ b/apps/plugins/rb_info.c @@ -557,7 +557,7 @@ enum plugin_status plugin_start(const void* parameter) else redraw = true; ret = menu_action_cb(&action, selected_item, &exit, &lists); - if (rb->gui_synclist_do_button(&lists,&action,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&lists, &action)) continue; selected_item = rb->gui_synclist_get_sel_pos(&lists); } diff --git a/apps/plugins/shopper.c b/apps/plugins/shopper.c index 31ef44b831..25a484a31e 100644 --- a/apps/plugins/shopper.c +++ b/apps/plugins/shopper.c @@ -315,7 +315,7 @@ enum plugin_status plugin_start(const void* parameter) rb->gui_synclist_draw(&lists); cur_sel = rb->gui_synclist_get_sel_pos(&lists); button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&lists,&button,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&lists, &button)) continue; switch (button) { diff --git a/apps/plugins/shortcuts/shortcuts_view.c b/apps/plugins/shortcuts/shortcuts_view.c index 9584731989..2a7970bebe 100644 --- a/apps/plugins/shortcuts/shortcuts_view.c +++ b/apps/plugins/shortcuts/shortcuts_view.c @@ -59,13 +59,8 @@ enum sc_list_action_type draw_sc_list(struct gui_synclist *gui_sc) /* user input */ button = rb->get_action(CONTEXT_LIST, HZ); /* HZ so the status bar redraws corectly */ - if (rb->gui_synclist_do_button(gui_sc, &button, - LIST_WRAP_UNLESS_HELD)) { - /* automatic handling of user input. - * _UNLESS_HELD can be _ON or _OFF also - * selection changed, so redraw */ + if (rb->gui_synclist_do_button(gui_sc, &button)) continue; - } switch (button) { /* process the user input */ case ACTION_STD_OK: return SCLA_SELECT; diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index 748e872d0b..8740606c58 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c @@ -394,7 +394,7 @@ enum plugin_status plugin_start(const void* parameter) rb->gui_synclist_draw(&lists); cur_sel = rb->gui_synclist_get_sel_pos(&lists); button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); - if (rb->gui_synclist_do_button(&lists,&button,LIST_WRAP_UNLESS_HELD)) + if (rb->gui_synclist_do_button(&lists, &button)) continue; switch (button) { diff --git a/apps/radio/presets.c b/apps/radio/presets.c index 51bdabdfce..6966f7e591 100644 --- a/apps/radio/presets.c +++ b/apps/radio/presets.c @@ -490,8 +490,7 @@ int handle_radio_presets(void) while (result == 0) { gui_synclist_draw(&lists); - list_do_action(CONTEXT_STD, TIMEOUT_BLOCK, - &lists, &action, LIST_WRAP_UNLESS_HELD); + list_do_action(CONTEXT_STD, TIMEOUT_BLOCK, &lists, &action); switch (action) { case ACTION_STD_MENU: diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 0a3c7af494..6c52adf5d3 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -1265,7 +1265,7 @@ bool recording_screen(bool no_source) } /* let list handle the button */ - gui_synclist_do_button(&lists, &button, LIST_WRAP_UNLESS_HELD); + gui_synclist_do_button(&lists, &button); switch(button) diff --git a/apps/screens.c b/apps/screens.c index 24d1fed915..7c5440f50d 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -714,8 +714,7 @@ bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_a gui_synclist_draw(&id3_lists); gui_synclist_speak_item(&id3_lists); while (true) { - if(!list_do_action(CONTEXT_LIST,HZ/2, - &id3_lists, &key,LIST_WRAP_UNLESS_HELD) + if(!list_do_action(CONTEXT_LIST,HZ/2, &id3_lists, &key) && key!=ACTION_NONE && key!=ACTION_UNKNOWN) { if (key == ACTION_STD_OK || key == ACTION_STD_CANCEL) @@ -793,8 +792,7 @@ int view_runtime(void) say_runtime = false; } gui_synclist_draw(&lists); - list_do_action(CONTEXT_STD, HZ, - &lists, &action, LIST_WRAP_UNLESS_HELD); + list_do_action(CONTEXT_STD, HZ, &lists, &action); if(action == ACTION_STD_CANCEL) break; if(action == ACTION_STD_OK) { diff --git a/apps/tree.c b/apps/tree.c index cef990617c..a034fd0545 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -649,7 +649,7 @@ static int dirbrowse(void) button = get_action(CONTEXT_TREE|ALLOW_SOFTLOCK, list_do_action_timeout(&tree_lists, HZ/2)); oldbutton = button; - gui_synclist_do_button(&tree_lists, &button,LIST_WRAP_UNLESS_HELD); + gui_synclist_do_button(&tree_lists, &button); tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); switch ( button ) { case ACTION_STD_OK: -- cgit v1.2.3