1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-03 00:38:44 +00:00

Use config_file_read in more places

This commit is contained in:
twinaphex 2019-04-22 02:10:12 +02:00
parent 955a149ce9
commit 317a443741
9 changed files with 11 additions and 14 deletions

View File

@ -2401,8 +2401,7 @@ static config_file_t *open_default_config_file(void)
if (!conf)
{
bool saved = false;
conf = config_file_new(NULL);
conf = config_file_new(NULL);
if (conf)
{
@ -3885,7 +3884,7 @@ bool config_save_file(const char *path)
struct config_float_setting *float_settings = NULL;
struct config_array_setting *array_settings = NULL;
struct config_path_setting *path_settings = NULL;
config_file_t *conf = config_file_new(path);
config_file_t *conf = config_file_read(path);
settings_t *settings = config_get_ptr();
int bool_settings_size = sizeof(settings->bools) / sizeof(settings->bools.placeholder);
int float_settings_size = sizeof(settings->floats)/ sizeof(settings->floats.placeholder);

View File

@ -124,7 +124,7 @@ static void salamander_init(char *s, size_t len)
{
char tmp_str[PATH_MAX_LENGTH] = {0};
config_file_t * conf = (config_file_t*)
config_file_new(g_defaults.path.config);
config_file_read(g_defaults.path.config);
if (conf)
{

View File

@ -404,7 +404,7 @@ rarch_softfilter_t *rarch_softfilter_new(const char *filter_config,
if (!filt)
return NULL;
filt->conf = config_file_new(filter_config);
filt->conf = config_file_read(filter_config);
if (!filt->conf)
{
RARCH_ERR("[SoftFilter]: Did not find config: %s\n", filter_config);

View File

@ -166,7 +166,7 @@ bool input_remapping_save_file(const char *path)
free(buf);
conf = config_file_new(remap_file);
conf = config_file_read(remap_file);
if (!conf)
{

View File

@ -170,9 +170,7 @@ bool cheat_manager_save(const char *path, const char *cheat_database, bool overw
}
if (!overwrite)
conf = config_file_new(cheats_file);
else
conf = config_file_new(NULL);
conf = config_file_read(cheats_file);
if (!conf)
conf = config_file_new(NULL);

View File

@ -178,7 +178,7 @@ core_option_manager_t *core_option_manager_new(const char *conf_path,
return NULL;
if (!string_is_empty(conf_path))
opt->conf = config_file_new(conf_path);
opt->conf = config_file_read(conf_path);
if (!opt->conf)
opt->conf = config_file_new(NULL);

View File

@ -1487,7 +1487,7 @@ static int generic_action_ok(const char *path,
break;
case ACTION_OK_LOAD_REMAPPING_FILE:
{
config_file_t *conf = config_file_new(action_path);
config_file_t *conf = config_file_read(action_path);
flush_char = msg_hash_to_str(flush_id);
if (conf)
@ -3773,7 +3773,7 @@ static int action_ok_option_create(const char *path,
return 0;
}
conf = config_file_new(game_path);
conf = config_file_read(game_path);
if (!conf)
{

View File

@ -763,7 +763,7 @@ static bool ffmpeg_init_config(struct ff_config_param *params,
if (!config)
return true;
params->conf = config_file_new(config);
params->conf = config_file_read(config);
RARCH_LOG("[FFmpeg] Loading FFmpeg config \"%s\".\n", config);
if (!params->conf)
{

View File

@ -132,7 +132,7 @@ void CoreOptionsDialog::onSaveGameSpecificOptions()
return;
}
conf = config_file_new(game_path);
conf = config_file_read(game_path);
if (!conf)
{