mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-30 14:53:39 +00:00
Cleanups
This commit is contained in:
parent
5b188066f1
commit
4ae1e9a53d
@ -218,7 +218,7 @@ void menu_free(menu_handle_t *menu)
|
||||
free(global->core_info.current);
|
||||
global->core_info.current = NULL;
|
||||
|
||||
menu_driver_unset_alive();
|
||||
menu_driver_toggle(false);
|
||||
|
||||
free(menu);
|
||||
}
|
||||
@ -286,7 +286,7 @@ void *menu_init(const void *data)
|
||||
|
||||
rarch_assert(disp->msg_queue = msg_queue_new(8));
|
||||
|
||||
menu_driver_set_alive();
|
||||
menu_driver_toggle(true);
|
||||
|
||||
return menu;
|
||||
|
||||
|
@ -337,12 +337,32 @@ void menu_driver_free(menu_handle_t *menu)
|
||||
driver->free(menu);
|
||||
}
|
||||
|
||||
bool menu_driver_alive(void)
|
||||
{
|
||||
return menu_alive;
|
||||
}
|
||||
|
||||
static void menu_driver_set_alive(void)
|
||||
{
|
||||
menu_alive = true;
|
||||
}
|
||||
|
||||
static void menu_driver_unset_alive(void)
|
||||
{
|
||||
menu_alive = false;
|
||||
}
|
||||
|
||||
void menu_driver_toggle(bool latch)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (driver->toggle)
|
||||
driver->toggle(latch);
|
||||
|
||||
if (latch)
|
||||
menu_driver_set_alive();
|
||||
else
|
||||
menu_driver_unset_alive();
|
||||
}
|
||||
|
||||
bool menu_driver_load_image(void *data, menu_image_type_t type)
|
||||
@ -355,20 +375,6 @@ bool menu_driver_load_image(void *data, menu_image_type_t type)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_driver_alive(void)
|
||||
{
|
||||
return menu_alive;
|
||||
}
|
||||
|
||||
void menu_driver_set_alive(void)
|
||||
{
|
||||
menu_alive = true;
|
||||
}
|
||||
|
||||
void menu_driver_unset_alive(void)
|
||||
{
|
||||
menu_alive = false;
|
||||
}
|
||||
|
||||
bool menu_environment_cb(menu_environ_cb_t type, void *data)
|
||||
{
|
||||
|
@ -226,10 +226,6 @@ void menu_driver_context_destroy(void);
|
||||
|
||||
bool menu_driver_alive(void);
|
||||
|
||||
void menu_driver_set_alive(void);
|
||||
|
||||
void menu_driver_unset_alive(void);
|
||||
|
||||
size_t menu_driver_list_get_selection(void);
|
||||
|
||||
bool menu_environment_cb(menu_environ_cb_t type, void *data);
|
||||
|
@ -1389,7 +1389,6 @@ void rarch_main_set_state(unsigned cmd)
|
||||
}
|
||||
|
||||
menu_entries_set_refresh(false);
|
||||
menu_driver_set_alive();
|
||||
#endif
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (settings->input.overlay_hide_in_menu)
|
||||
@ -1428,7 +1427,6 @@ void rarch_main_set_state(unsigned cmd)
|
||||
case RARCH_ACTION_STATE_MENU_RUNNING_FINISHED:
|
||||
#ifdef HAVE_MENU
|
||||
menu_driver_toggle(false);
|
||||
menu_driver_unset_alive();
|
||||
|
||||
driver_set_nonblock_state(driver->nonblock_state);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user