Rewrite open_deafult_config so that warnings are silenced
This commit is contained in:
parent
1b89c23a42
commit
262af26c18
19
settings.c
19
settings.c
|
@ -759,11 +759,9 @@ static config_file_t *open_default_config_file(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (conf)
|
||||
goto exit;
|
||||
|
||||
/* Try to create a new config file. */
|
||||
if (!conf)
|
||||
{
|
||||
/* Try to create a new config file. */
|
||||
conf = config_file_new(NULL);
|
||||
|
||||
if (conf)
|
||||
|
@ -801,9 +799,8 @@ static config_file_t *open_default_config_file(void)
|
|||
"retroarch.cfg", sizeof(conf_path));
|
||||
conf = config_file_new(conf_path);
|
||||
|
||||
if (conf)
|
||||
goto exit;
|
||||
|
||||
if (!conf)
|
||||
{
|
||||
conf = config_file_new(NULL);
|
||||
|
||||
if (conf)
|
||||
|
@ -823,6 +820,7 @@ static config_file_t *open_default_config_file(void)
|
|||
}
|
||||
|
||||
RARCH_WARN("Created new config file in: \"%s\".\n", conf_path);
|
||||
}
|
||||
#elif !defined(__CELLOS_LV2__) && !defined(_XBOX)
|
||||
const char *xdg = getenv("XDG_CONFIG_HOME");
|
||||
const char *home = getenv("HOME");
|
||||
|
@ -855,9 +853,8 @@ static config_file_t *open_default_config_file(void)
|
|||
conf = config_file_new(conf_path);
|
||||
}
|
||||
|
||||
if (conf)
|
||||
goto exit;
|
||||
|
||||
if (!conf)
|
||||
{
|
||||
if (home || xdg)
|
||||
{
|
||||
/* Try to create a new config file. */
|
||||
|
@ -909,9 +906,9 @@ static config_file_t *open_default_config_file(void)
|
|||
RARCH_WARN("Created new config file in: \"%s\".\n", conf_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
exit:
|
||||
if (!conf)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue