mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Move refresh variables to menu_entries_t
This commit is contained in:
parent
bbb4121a1c
commit
08d8f86bd9
@ -49,8 +49,6 @@ typedef struct
|
|||||||
|
|
||||||
float scroll_y;
|
float scroll_y;
|
||||||
|
|
||||||
bool need_refresh;
|
|
||||||
bool nonblocking_refresh;
|
|
||||||
bool push_start_screen;
|
bool push_start_screen;
|
||||||
|
|
||||||
bool defer_core;
|
bool defer_core;
|
||||||
@ -71,7 +69,6 @@ typedef struct
|
|||||||
|
|
||||||
menu_input_t input;
|
menu_input_t input;
|
||||||
|
|
||||||
|
|
||||||
content_playlist_t *playlist;
|
content_playlist_t *playlist;
|
||||||
char db_playlist_file[PATH_MAX_LENGTH];
|
char db_playlist_file[PATH_MAX_LENGTH];
|
||||||
} menu_handle_t;
|
} menu_handle_t;
|
||||||
|
@ -120,16 +120,15 @@ void menu_entries_get_core_title(char *s, size_t len)
|
|||||||
|
|
||||||
static bool menu_entries_get_nonblocking_refresh(void)
|
static bool menu_entries_get_nonblocking_refresh(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_entries_t *entries = menu_entries_get_ptr();
|
||||||
if (!menu)
|
if (!entries)
|
||||||
return false;
|
return false;
|
||||||
return menu->nonblocking_refresh;
|
return entries->nonblocking_refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
int menu_entries_refresh(unsigned action)
|
int menu_entries_refresh(unsigned action)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
if (menu_entries_get_nonblocking_refresh())
|
||||||
if (!menu || menu_entries_get_nonblocking_refresh())
|
|
||||||
return -1;
|
return -1;
|
||||||
if (!menu_entries_needs_refresh())
|
if (!menu_entries_needs_refresh())
|
||||||
return -1;
|
return -1;
|
||||||
@ -138,40 +137,40 @@ int menu_entries_refresh(unsigned action)
|
|||||||
|
|
||||||
bool menu_entries_needs_refresh(void)
|
bool menu_entries_needs_refresh(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_entries_t *entries = menu_entries_get_ptr();
|
||||||
if (!menu)
|
if (!entries)
|
||||||
return false;
|
return false;
|
||||||
return menu->need_refresh;
|
return entries->need_refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_entries_set_nonblocking_refresh(void)
|
void menu_entries_set_nonblocking_refresh(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_entries_t *entries = menu_entries_get_ptr();
|
||||||
if (!menu)
|
if (!entries)
|
||||||
return;
|
return;
|
||||||
menu->nonblocking_refresh = true;
|
entries->nonblocking_refresh = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_entries_unset_nonblocking_refresh(void)
|
void menu_entries_unset_nonblocking_refresh(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_entries_t *entries = menu_entries_get_ptr();
|
||||||
if (!menu)
|
if (!entries)
|
||||||
return;
|
return;
|
||||||
menu->nonblocking_refresh = false;
|
entries->nonblocking_refresh = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_entries_set_refresh(void)
|
void menu_entries_set_refresh(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_entries_t *entries = menu_entries_get_ptr();
|
||||||
if (!menu)
|
if (!entries)
|
||||||
return;
|
return;
|
||||||
menu->need_refresh = true;
|
entries->need_refresh = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_entries_unset_refresh(void)
|
void menu_entries_unset_refresh(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_entries_t *entries = menu_entries_get_ptr();
|
||||||
if (!menu)
|
if (!entries)
|
||||||
return;
|
return;
|
||||||
menu->need_refresh = false;
|
entries->need_refresh = false;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,10 @@ extern "C" {
|
|||||||
|
|
||||||
typedef struct menu_entries
|
typedef struct menu_entries
|
||||||
{
|
{
|
||||||
|
/* Flagged when menu entries need to be refreshed */
|
||||||
|
bool need_refresh;
|
||||||
|
bool nonblocking_refresh;
|
||||||
|
|
||||||
size_t begin;
|
size_t begin;
|
||||||
menu_list_t *menu_list;
|
menu_list_t *menu_list;
|
||||||
rarch_setting_t *list_settings;
|
rarch_setting_t *list_settings;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user