mirror of
https://github.com/libretro/RetroArch
synced 2025-02-27 09:41:14 +00:00
Create CORE_INFO_CTL_LOAD
This commit is contained in:
parent
e566665885
commit
d3b9356958
@ -989,8 +989,7 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
|
||||
if (menu_driver_ctl(RARCH_MENU_CTL_LOAD_NO_CONTENT_GET, &ptr))
|
||||
{
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_ctx_find_t info_find;
|
||||
|
||||
#if defined(HAVE_DYNAMIC)
|
||||
if (!(*settings->libretro))
|
||||
@ -999,16 +998,9 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
libretro_get_system_info(settings->libretro, system,
|
||||
ptr);
|
||||
#endif
|
||||
core_info_ctl(CORE_INFO_CTL_LIST_GET, &core_info_list);
|
||||
info_find.path = settings->libretro;
|
||||
|
||||
if (!core_info_list)
|
||||
return false;
|
||||
|
||||
/* Load core info file */
|
||||
core_info_ctl(CORE_INFO_CTL_CURRENT_CORE_GET, &core_info);
|
||||
|
||||
if (!core_info_list_get_info(core_info_list,
|
||||
core_info, settings->libretro))
|
||||
if (!core_info_ctl(CORE_INFO_CTL_LOAD, &info_find))
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
18
core_info.c
18
core_info.c
@ -711,6 +711,24 @@ bool core_info_ctl(enum core_info_state state, void *data)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CORE_INFO_CTL_LOAD:
|
||||
{
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_ctx_find_t *info = (core_info_ctx_find_t*)data;
|
||||
|
||||
if (!info)
|
||||
return false;
|
||||
|
||||
core_info_ctl(CORE_INFO_CTL_CURRENT_CORE_GET, &core_info);
|
||||
|
||||
if (!core_info_curr_list)
|
||||
return false;
|
||||
|
||||
if (!core_info_list_get_info(core_info_curr_list,
|
||||
core_info, info->path))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CORE_INFO_CTL_NONE:
|
||||
default:
|
||||
break;
|
||||
|
@ -34,6 +34,7 @@ enum core_info_state
|
||||
CORE_INFO_CTL_CURRENT_CORE_FREE,
|
||||
CORE_INFO_CTL_CURRENT_CORE_INIT,
|
||||
CORE_INFO_CTL_CURRENT_CORE_GET,
|
||||
CORE_INFO_CTL_LOAD,
|
||||
CORE_INFO_CTL_FIND
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user