diff --git a/configuration.c b/configuration.c index 02f78031bc..952bce9437 100644 --- a/configuration.c +++ b/configuration.c @@ -3234,7 +3234,7 @@ end: * Returns: false if there was an error or no action was performed. * */ -bool config_load_override(void) +bool config_load_override(void *data) { size_t path_size = PATH_MAX_LENGTH * sizeof(char); char *buf = NULL; @@ -3243,7 +3243,7 @@ bool config_load_override(void) char *content_path = NULL; char *config_directory = NULL; bool should_append = false; - rarch_system_info_t *system = runloop_get_system_info(); + rarch_system_info_t *system = (rarch_system_info_t*)data; const char *core_name = system ? system->info.library_name : NULL; const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME); @@ -3964,7 +3964,7 @@ bool config_save_file(const char *path) * * Returns: true (1) on success, otherwise returns false (0). **/ -bool config_save_overrides(int override_type) +bool config_save_overrides(enum override_type type) { size_t path_size = PATH_MAX_LENGTH * sizeof(char); int tmp_i = 0; @@ -4154,23 +4154,21 @@ bool config_save_overrides(int override_type) ret = false; - switch (override_type) + switch (type) { case OVERRIDE_CORE: - /* Create a new config file from core_path */ RARCH_LOG ("[Overrides] path %s\n", core_path); ret = config_file_write(conf, core_path, true); break; case OVERRIDE_GAME: - /* Create a new config file from core_path */ RARCH_LOG ("[Overrides] path %s\n", game_path); ret = config_file_write(conf, game_path, true); break; case OVERRIDE_CONTENT_DIR: - /* Create a new config file from content_path */ RARCH_LOG ("[Overrides] path %s\n", content_path); ret = config_file_write(conf, content_path, true); break; + case OVERRIDE_NONE: default: break; } diff --git a/configuration.h b/configuration.h index 9c8d85f6fe..1bf4d37275 100644 --- a/configuration.h +++ b/configuration.h @@ -828,7 +828,7 @@ void config_parse_file(void *data); * Returns: false if there was an error or no action was performed. * */ -bool config_load_override(void); +bool config_load_override(void *data); /** * config_unload_override: @@ -876,7 +876,7 @@ bool config_save_file(const char *path); * * Returns: true (1) on success, otherwise returns false (0). **/ -bool config_save_overrides(int override_type); +bool config_save_overrides(enum override_type type); /* Replaces currently loaded configuration file with * another one. Will load a dummy core to flush state diff --git a/retroarch.c b/retroarch.c index 4b807e3600..b993e6fe4e 100644 --- a/retroarch.c +++ b/retroarch.c @@ -5896,7 +5896,7 @@ static bool command_event_init_core(enum rarch_core_type type) #ifdef HAVE_CONFIGFILE /* auto overrides: apply overrides */ if (settings->bools.auto_overrides_enable) - runloop_overrides_active = config_load_override(); + runloop_overrides_active = config_load_override(&runloop_system); #endif /* Load auto-shaders on the next occasion */