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;
|
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:
|
* init_drivers:
|
||||||
* @flags : Bitmask of drivers to initialize.
|
* @flags : Bitmask of drivers to initialize.
|
||||||
|
@ -350,8 +329,6 @@ static void init_drivers(int flags)
|
||||||
init_location();
|
init_location();
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_update_libretro_info();
|
|
||||||
|
|
||||||
if (flags & DRIVER_MENU)
|
if (flags & DRIVER_MENU)
|
||||||
{
|
{
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_INIT, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_INIT, NULL);
|
||||||
|
|
|
@ -283,6 +283,25 @@ const char *menu_driver_ident(void)
|
||||||
return menu_driver_ctx->ident;
|
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)
|
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
|
@ -555,6 +574,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||||
case RARCH_MENU_CTL_INIT:
|
case RARCH_MENU_CTL_INIT:
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
menu_update_libretro_info();
|
||||||
if (menu_driver_data)
|
if (menu_driver_data)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue