mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Create menu_do_refresh
This commit is contained in:
parent
a4b200abd8
commit
324e55f66d
16
menu/menu.c
16
menu/menu.c
@ -297,8 +297,8 @@ int menu_iterate(retro_input_t input,
|
|||||||
|
|
||||||
action = menu->input.joypad;
|
action = menu->input.joypad;
|
||||||
|
|
||||||
if (menu_needs_refresh() && !menu->nonblocking_refresh && action != MENU_ACTION_MESSAGE)
|
if (menu_do_refresh(action) == 0)
|
||||||
action = MENU_ACTION_REFRESH;
|
return 0;
|
||||||
|
|
||||||
ret = menu_entry_iterate(action);
|
ret = menu_entry_iterate(action);
|
||||||
|
|
||||||
@ -313,6 +313,18 @@ int menu_iterate(retro_input_t input,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int menu_do_refresh(unsigned action)
|
||||||
|
{
|
||||||
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
if (!menu || menu->nonblocking_refresh)
|
||||||
|
return -1;
|
||||||
|
if (!menu_needs_refresh())
|
||||||
|
return -1;
|
||||||
|
if (action == MENU_ACTION_MESSAGE)
|
||||||
|
return -1;
|
||||||
|
return menu_entry_iterate(MENU_ACTION_REFRESH);
|
||||||
|
}
|
||||||
|
|
||||||
bool menu_needs_refresh(void)
|
bool menu_needs_refresh(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
@ -188,6 +188,8 @@ bool menu_load_content(void);
|
|||||||
|
|
||||||
void menu_update_system_info(menu_handle_t *menu, bool *load_no_content);
|
void menu_update_system_info(menu_handle_t *menu, bool *load_no_content);
|
||||||
|
|
||||||
|
int menu_do_refresh(unsigned action);
|
||||||
|
|
||||||
bool menu_needs_refresh(void);
|
bool menu_needs_refresh(void);
|
||||||
|
|
||||||
void menu_set_refresh(void);
|
void menu_set_refresh(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user