mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 12:35:23 +00:00
(Salamander PS3) Create config file with libretro_path if it doesn't exist
This commit is contained in:
parent
946d09251c
commit
90b481acbd
@ -91,15 +91,26 @@ static void init_settings(void)
|
|||||||
{
|
{
|
||||||
config_file_t * conf = config_file_new(default_paths.config_file);
|
config_file_t * conf = config_file_new(default_paths.config_file);
|
||||||
config_get_array(conf, "libretro_path", tmp_str, sizeof(tmp_str));
|
config_get_array(conf, "libretro_path", tmp_str, sizeof(tmp_str));
|
||||||
|
config_file_free(conf);
|
||||||
snprintf(libretro_path, sizeof(libretro_path), tmp_str);
|
snprintf(libretro_path, sizeof(libretro_path), tmp_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!config_file_exists || strcmp(libretro_path, "") == 0)
|
if(!config_file_exists || strcmp(libretro_path, "") == 0)
|
||||||
|
{
|
||||||
find_and_set_first_file();
|
find_and_set_first_file();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RARCH_LOG("Start [%s] found in retroarch.cfg.\n", libretro_path);
|
RARCH_LOG("Start [%s] found in retroarch.cfg.\n", libretro_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!config_file_exists)
|
||||||
|
{
|
||||||
|
config_file_t *new_conf = config_file_new(NULL);
|
||||||
|
config_set_string(new_conf, "libretro_path", libretro_path);
|
||||||
|
config_file_write(new_conf, default_paths.config_file);
|
||||||
|
config_file_free(new_conf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user