mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
Create MENU_ENTRIES_CTL_REFRESH
This commit is contained in:
parent
2e8f015de3
commit
03199b564f
@ -3325,7 +3325,7 @@ void menu_displaylist_push_list_process(menu_displaylist_info_t *info)
|
|||||||
file_list_sort_on_alt(info->list);
|
file_list_sort_on_alt(info->list);
|
||||||
|
|
||||||
if (info->need_refresh)
|
if (info->need_refresh)
|
||||||
menu_entries_refresh(info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_REFRESH, info->list);
|
||||||
|
|
||||||
if (info->need_push)
|
if (info->need_push)
|
||||||
{
|
{
|
||||||
|
@ -317,13 +317,15 @@ static void menu_entries_build_scroll_indices(file_list_t *list)
|
|||||||
*
|
*
|
||||||
* Ensure it doesn't overflow.
|
* Ensure it doesn't overflow.
|
||||||
**/
|
**/
|
||||||
void menu_entries_refresh(file_list_t *list)
|
static bool menu_entries_refresh(void *data)
|
||||||
{
|
{
|
||||||
size_t list_size, selection;
|
size_t list_size, selection;
|
||||||
|
file_list_t *list = (file_list_t*)data;
|
||||||
|
|
||||||
if (!list)
|
if (!list)
|
||||||
return;
|
return false;
|
||||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
menu_entries_build_scroll_indices(list);
|
menu_entries_build_scroll_indices(list);
|
||||||
|
|
||||||
@ -341,6 +343,8 @@ void menu_entries_refresh(file_list_t *list)
|
|||||||
bool pending_push = true;
|
bool pending_push = true;
|
||||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_CLEAR, &pending_push);
|
menu_navigation_ctl(MENU_NAVIGATION_CTL_CLEAR, &pending_push);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the last index (+1) of the menu entry list. */
|
/* Returns the last index (+1) of the menu entry list. */
|
||||||
@ -715,6 +719,8 @@ bool menu_entries_ctl(enum menu_entries_ctl_state state, void *data)
|
|||||||
*idx = menu_entries_begin;
|
*idx = menu_entries_begin;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
case MENU_ENTRIES_CTL_REFRESH:
|
||||||
|
return menu_entries_refresh(data);
|
||||||
case MENU_ENTRIES_CTL_INIT:
|
case MENU_ENTRIES_CTL_INIT:
|
||||||
return menu_entries_init();
|
return menu_entries_init();
|
||||||
case MENU_ENTRIES_CTL_SHOW_BACK:
|
case MENU_ENTRIES_CTL_SHOW_BACK:
|
||||||
|
@ -119,6 +119,7 @@ enum menu_entries_ctl_state
|
|||||||
MENU_ENTRIES_CTL_SET_START,
|
MENU_ENTRIES_CTL_SET_START,
|
||||||
/* Returns the starting index of the menu entry list. */
|
/* Returns the starting index of the menu entry list. */
|
||||||
MENU_ENTRIES_CTL_START_GET,
|
MENU_ENTRIES_CTL_START_GET,
|
||||||
|
MENU_ENTRIES_CTL_REFRESH,
|
||||||
MENU_ENTRIES_CTL_SHOW_BACK
|
MENU_ENTRIES_CTL_SHOW_BACK
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -176,8 +177,6 @@ bool menu_entries_increment_menu_stack(void);
|
|||||||
void menu_entries_push_selection_buf(file_list_t *list, const char *path, const char *label,
|
void menu_entries_push_selection_buf(file_list_t *list, const char *path, const char *label,
|
||||||
unsigned type, size_t directory_ptr, size_t entry_idx);
|
unsigned type, size_t directory_ptr, size_t entry_idx);
|
||||||
|
|
||||||
void menu_entries_refresh(file_list_t *list);
|
|
||||||
|
|
||||||
rarch_setting_t *menu_entries_get_setting(uint32_t i);
|
rarch_setting_t *menu_entries_get_setting(uint32_t i);
|
||||||
|
|
||||||
bool menu_entries_ctl(enum menu_entries_ctl_state state, void *data);
|
bool menu_entries_ctl(enum menu_entries_ctl_state state, void *data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user