mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 10:10:57 +00:00
Move menu_update_libretro_info to menu_driver.c
This commit is contained in:
parent
f26044678d
commit
ff07d3569b
23
driver.c
23
driver.c
@ -270,27 +270,6 @@ static bool driver_update_system_av_info(const struct retro_system_av_info *info
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
/**
|
||||
* menu_update_libretro_info:
|
||||
*
|
||||
* Update menu state which depends on config.
|
||||
**/
|
||||
static void menu_update_libretro_info(void)
|
||||
{
|
||||
struct retro_system_info *info = NULL;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET,
|
||||
&info);
|
||||
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
command_event(CMD_EVENT_CORE_INFO_INIT, NULL);
|
||||
command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* init_drivers:
|
||||
* @flags : Bitmask of drivers to initialize.
|
||||
@ -350,8 +329,6 @@ static void init_drivers(int flags)
|
||||
init_location();
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_update_libretro_info();
|
||||
|
||||
if (flags & DRIVER_MENU)
|
||||
{
|
||||
menu_driver_ctl(RARCH_MENU_CTL_INIT, NULL);
|
||||
|
@ -283,6 +283,25 @@ const char *menu_driver_ident(void)
|
||||
return menu_driver_ctx->ident;
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_update_libretro_info:
|
||||
*
|
||||
* Update menu state which depends on config.
|
||||
**/
|
||||
static void menu_update_libretro_info(void)
|
||||
{
|
||||
struct retro_system_info *info = NULL;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET,
|
||||
&info);
|
||||
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
command_event(CMD_EVENT_CORE_INFO_INIT, NULL);
|
||||
command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
}
|
||||
|
||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
@ -555,6 +574,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
case RARCH_MENU_CTL_INIT:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_update_libretro_info();
|
||||
if (menu_driver_data)
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user