mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 14:59:37 +00:00
Expose config load as a global function.
This commit is contained in:
parent
f3d9588e37
commit
57fbad1a54
@ -374,6 +374,9 @@ struct global
|
||||
|
||||
void parse_config(void);
|
||||
void config_set_defaults(void);
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
void config_load_file(const char *path);
|
||||
#endif
|
||||
|
||||
void ssnes_main_clear_state(void);
|
||||
int ssnes_main_init(int argc, char *argv[]);
|
||||
|
14
settings.c
14
settings.c
@ -314,15 +314,23 @@ static config_file_t *open_default_config_file(void)
|
||||
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
static void parse_config_file(void)
|
||||
{
|
||||
if (*g_extern.config_path)
|
||||
config_load_file(g_extern.config_path);
|
||||
else
|
||||
config_load_file(NULL);
|
||||
}
|
||||
|
||||
void config_load_file(const char *path)
|
||||
{
|
||||
config_file_t *conf = NULL;
|
||||
|
||||
if (*g_extern.config_path)
|
||||
if (path)
|
||||
{
|
||||
conf = config_file_new(g_extern.config_path);
|
||||
conf = config_file_new(path);
|
||||
if (!conf)
|
||||
{
|
||||
SSNES_ERR("Couldn't find config at path: \"%s\"\n", g_extern.config_path);
|
||||
SSNES_ERR("Couldn't find config at path: \"%s\"\n", path);
|
||||
ssnes_fail(1, "parse_config_file()");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user