1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-19 12:41:00 +00:00

Create RUNLOOP_CTL_CURRENT_CORE_LIST_FREE

This commit is contained in:
twinaphex 2015-12-11 13:33:07 +01:00
parent ab9c52e03e
commit eda9009df5
3 changed files with 13 additions and 6 deletions

@ -1213,12 +1213,7 @@ bool event_command(enum event_command cmd)
settings->content_history_size);
break;
case EVENT_CMD_CORE_INFO_DEINIT:
if (!global)
break;
if (global->core_info.list)
core_info_list_free(global->core_info.list);
global->core_info.list = NULL;
runloop_ctl(RUNLOOP_CTL_CURRENT_CORE_LIST_FREE, NULL);
break;
case EVENT_CMD_CORE_INFO_INIT:
event_command(EVENT_CMD_CORE_INFO_DEINIT);

@ -522,6 +522,17 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
return true;
case RUNLOOP_CTL_HAS_CORE_OPTIONS:
return runloop_system.core_options;
case RUNLOOP_CTL_CURRENT_CORE_LIST_FREE:
{
global_t *global = global_get_ptr();
if (!global)
return false;
if (global->core_info.list)
core_info_list_free(global->core_info.list);
global->core_info.list = NULL;
}
return true;
case RUNLOOP_CTL_CURRENT_CORE_FREE:
if (core_info_current)
free(core_info_current);

@ -70,6 +70,7 @@ enum runloop_ctl_state
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
RUNLOOP_CTL_IS_PERFCNT_ENABLE,
RUNLOOP_CTL_CURRENT_CORE_LIST_FREE,
RUNLOOP_CTL_CURRENT_CORE_FREE,
RUNLOOP_CTL_CURRENT_CORE_INIT,
RUNLOOP_CTL_CURRENT_CORE_GET,