Revert "Reimplement MENU_ACTION_REFRESH - do this step at menu_iterate_render"

This reverts commit 65bc2f3a8207e3ec83938dda113f5c956ec0f6b2.
This commit is contained in:
twinaphex 2015-08-22 00:08:25 +02:00
parent 65bc2f3a82
commit 5b188066f1
3 changed files with 13 additions and 8 deletions

View File

@ -358,6 +358,9 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
menu_list_t *menu_list = menu_list_get_ptr();
menu_file_list_cbs_t *cbs = menu_list_get_actiondata_at_offset(menu_list->selection_buf, i);
if (menu_entries_needs_refresh())
action = MENU_ACTION_REFRESH;
switch (action)
{
case MENU_ACTION_UP:
@ -405,6 +408,14 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
ret = cbs->action_select(entry->path, entry->label, entry->type, i);
break;
case MENU_ACTION_REFRESH:
if (cbs && cbs->action_refresh)
{
ret = cbs->action_refresh(menu_list->selection_buf, menu_list->menu_stack);
menu_entries_unset_refresh(false);
}
break;
case MENU_ACTION_MESSAGE:
{
menu_display_t *disp = menu_display_get_ptr();

View File

@ -51,6 +51,7 @@ typedef enum menu_action
MENU_ACTION_SEARCH,
MENU_ACTION_SCAN,
MENU_ACTION_CANCEL,
MENU_ACTION_REFRESH,
MENU_ACTION_INFO,
MENU_ACTION_SELECT,
MENU_ACTION_START,

View File

@ -548,18 +548,11 @@ end:
int menu_iterate_render(void)
{
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
if (!menu)
return -1;
if (menu_entries_needs_refresh())
{
menu_displaylist_push(menu_list->selection_buf, menu_list->menu_stack);
menu_entries_unset_refresh(false);
}
if (menu->state.fb_is_dirty != menu->state.do_messagebox)
menu->state.fb_is_dirty = true;