Create RUNLOOP_CTL_CURRENT_CORE_GET

This commit is contained in:
twinaphex 2015-12-11 13:19:40 +01:00
parent 01ca22587a
commit df17c38598
2 changed files with 10 additions and 0 deletions

View File

@ -521,6 +521,15 @@ 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_GET:
{
global_t *global = global_get_ptr();
core_info_t **core = (core_info_t**)data;
if (!core || !global)
return false;
*core = global->core_info.current;
}
return true;
case RUNLOOP_CTL_SYSTEM_INFO_GET:
{
rarch_system_info_t **system = (rarch_system_info_t**)data;

View File

@ -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_GET,
RUNLOOP_CTL_DATA_DEINIT,
/* Checks for state changes in this frame. */
RUNLOOP_CTL_CHECK_STATE,