core_info_list_iterate - use config_file_from_string

This commit is contained in:
twinaphex 2019-07-16 19:01:43 +02:00
parent f73e4e9af8
commit 319e708738
2 changed files with 10 additions and 2 deletions

View File

@ -225,7 +225,16 @@ static config_file_t *core_info_list_iterate(
info_path_base = NULL;
if (path_is_valid(info_path))
conf = config_file_new(info_path);
{
int64_t length = 0;
uint8_t *ret_buf = NULL;
if (filestream_read_file(info_path, (void**)&ret_buf, &length))
{
if (length >= 0)
conf = config_file_new_from_string((const char*)ret_buf);
free((void*)ret_buf);
}
}
free(info_path);
return conf;

View File

@ -328,7 +328,6 @@ static bool input_autoconfigure_joypad_from_conf_dir(
int current_best = 0;
config_file_t *best_conf = NULL;
struct string_list *list = NULL;
struct retro_perf_counter perf;
best_path[0] = '\0';
path[0] = '\0';