Create HAS_SET_SUBSYSTEMS for rarch_ctl

This commit is contained in:
twinaphex 2019-12-30 07:46:33 +01:00
parent 096a420e7b
commit 1e45692f0b
3 changed files with 8 additions and 0 deletions

View file

@ -87,6 +87,7 @@ struct retro_core_t
bool symbols_inited;
bool game_loaded;
bool input_polled;
bool has_set_subsystems;
bool has_set_input_descriptors;
uint64_t serialization_quirks_v;
};

View file

@ -7678,6 +7678,7 @@ static void global_free(void)
runloop_remaps_content_dir_active = false;
current_core.has_set_input_descriptors = false;
current_core.has_set_subsystems = false;
global = &g_extern;
path_clear_all();
@ -9763,6 +9764,7 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
memcpy(system->subsystem.data, info,
i * sizeof(*system->subsystem.data));
system->subsystem.size = i;
current_core.has_set_subsystems = true;
}
break;
}
@ -24474,6 +24476,7 @@ static void retroarch_parse_input_and_config(int argc, char *argv[])
/* Flush out some states that could have been set
* by core environment variables. */
current_core.has_set_input_descriptors = false;
current_core.has_set_subsystems = false;
/* Load the config file now that we know what it is */
if (!rarch_block_config_read)
@ -25598,6 +25601,8 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
{
switch(state)
{
case RARCH_CTL_HAS_SET_SUBSYSTEMS:
return (current_core.has_set_subsystems);
case RARCH_CTL_CORE_IS_RUNNING:
return runloop_core_running;
case RARCH_CTL_BSV_MOVIE_IS_INITED:

View file

@ -113,6 +113,8 @@ enum rarch_ctl_state
/* Username */
RARCH_CTL_HAS_SET_USERNAME,
RARCH_CTL_HAS_SET_SUBSYSTEMS,
RARCH_CTL_TASK_INIT,
RARCH_CTL_SET_FRAME_TIME_LAST,