mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 00:40:09 +00:00
Create RUNLOOP_CTL_CURRENT_CORE_LIST_FREE
This commit is contained in:
parent
ab9c52e03e
commit
eda9009df5
@ -1213,12 +1213,7 @@ bool event_command(enum event_command cmd)
|
|||||||
settings->content_history_size);
|
settings->content_history_size);
|
||||||
break;
|
break;
|
||||||
case EVENT_CMD_CORE_INFO_DEINIT:
|
case EVENT_CMD_CORE_INFO_DEINIT:
|
||||||
if (!global)
|
runloop_ctl(RUNLOOP_CTL_CURRENT_CORE_LIST_FREE, NULL);
|
||||||
break;
|
|
||||||
|
|
||||||
if (global->core_info.list)
|
|
||||||
core_info_list_free(global->core_info.list);
|
|
||||||
global->core_info.list = NULL;
|
|
||||||
break;
|
break;
|
||||||
case EVENT_CMD_CORE_INFO_INIT:
|
case EVENT_CMD_CORE_INFO_INIT:
|
||||||
event_command(EVENT_CMD_CORE_INFO_DEINIT);
|
event_command(EVENT_CMD_CORE_INFO_DEINIT);
|
||||||
|
11
runloop.c
11
runloop.c
@ -522,6 +522,17 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
|||||||
return true;
|
return true;
|
||||||
case RUNLOOP_CTL_HAS_CORE_OPTIONS:
|
case RUNLOOP_CTL_HAS_CORE_OPTIONS:
|
||||||
return runloop_system.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:
|
case RUNLOOP_CTL_CURRENT_CORE_FREE:
|
||||||
if (core_info_current)
|
if (core_info_current)
|
||||||
free(core_info_current);
|
free(core_info_current);
|
||||||
|
@ -70,6 +70,7 @@ enum runloop_ctl_state
|
|||||||
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
|
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
|
||||||
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
|
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
|
||||||
RUNLOOP_CTL_IS_PERFCNT_ENABLE,
|
RUNLOOP_CTL_IS_PERFCNT_ENABLE,
|
||||||
|
RUNLOOP_CTL_CURRENT_CORE_LIST_FREE,
|
||||||
RUNLOOP_CTL_CURRENT_CORE_FREE,
|
RUNLOOP_CTL_CURRENT_CORE_FREE,
|
||||||
RUNLOOP_CTL_CURRENT_CORE_INIT,
|
RUNLOOP_CTL_CURRENT_CORE_INIT,
|
||||||
RUNLOOP_CTL_CURRENT_CORE_GET,
|
RUNLOOP_CTL_CURRENT_CORE_GET,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user