diff --git a/runloop.c b/runloop.c index fa6c7cdc02..82c9af1379 100644 --- a/runloop.c +++ b/runloop.c @@ -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; diff --git a/runloop.h b/runloop.h index 88ad4946b1..6ec0812ce9 100644 --- a/runloop.h +++ b/runloop.h @@ -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,