mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
Create wrapper functions for nonblocking_refresh
This commit is contained in:
parent
819723be06
commit
bbb4121a1c
@ -257,7 +257,7 @@ int cb_core_updater_list(void *data_, size_t len)
|
||||
core_buf[len] = '\0';
|
||||
core_len = len;
|
||||
|
||||
menu->nonblocking_refresh = false;
|
||||
menu_entries_unset_nonblocking_refresh();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -490,10 +490,10 @@ static int action_ok_core_updater_list(const char *path,
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
|
||||
driver->menu->nonblocking_refresh = true;
|
||||
|
||||
(void)url_path;
|
||||
|
||||
menu_entries_set_nonblocking_refresh();
|
||||
|
||||
if (settings->network.buildbot_url[0] == '\0')
|
||||
return -1;
|
||||
|
||||
|
@ -118,10 +118,18 @@ void menu_entries_get_core_title(char *s, size_t len)
|
||||
core_name, core_version);
|
||||
}
|
||||
|
||||
static bool menu_entries_get_nonblocking_refresh(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return false;
|
||||
return menu->nonblocking_refresh;
|
||||
}
|
||||
|
||||
int menu_entries_refresh(unsigned action)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu || menu->nonblocking_refresh)
|
||||
if (!menu || menu_entries_get_nonblocking_refresh())
|
||||
return -1;
|
||||
if (!menu_entries_needs_refresh())
|
||||
return -1;
|
||||
@ -136,6 +144,22 @@ bool menu_entries_needs_refresh(void)
|
||||
return menu->need_refresh;
|
||||
}
|
||||
|
||||
void menu_entries_set_nonblocking_refresh(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return;
|
||||
menu->nonblocking_refresh = true;
|
||||
}
|
||||
|
||||
void menu_entries_unset_nonblocking_refresh(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return;
|
||||
menu->nonblocking_refresh = false;
|
||||
}
|
||||
|
||||
void menu_entries_set_refresh(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
@ -57,6 +57,10 @@ void menu_entries_set_refresh(void);
|
||||
|
||||
void menu_entries_unset_refresh(void);
|
||||
|
||||
void menu_entries_set_nonblocking_refresh(void);
|
||||
|
||||
void menu_entries_unset_nonblocking_refresh(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user