Made tests in override function more consistent
This commit is contained in:
parent
793080b0c1
commit
85db635fbf
|
@ -1661,7 +1661,7 @@ bool config_load_override(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//early return in case a library isn't loaded
|
//early return in case a library isn't loaded
|
||||||
if(!global->system.info.library_name || !strcmp(global->system.info.library_name,"No Core"))
|
if (!global->system.info.library_name || !strcmp(global->system.info.library_name,"No Core"))
|
||||||
{
|
{
|
||||||
RARCH_LOG("No library loaded, not using overrides.\n");
|
RARCH_LOG("No library loaded, not using overrides.\n");
|
||||||
return true;
|
return true;
|
||||||
|
@ -1723,25 +1723,22 @@ bool config_load_override(void)
|
||||||
/* Append game-specific */
|
/* Append game-specific */
|
||||||
if (new_conf)
|
if (new_conf)
|
||||||
{
|
{
|
||||||
if(should_append)
|
if (should_append)
|
||||||
{
|
{
|
||||||
strlcat(global->append_config_path, "|", sizeof(global->append_config_path));
|
strlcat(global->append_config_path, "|", sizeof(global->append_config_path));
|
||||||
strlcat(global->append_config_path, game_path, sizeof(global->append_config_path));
|
strlcat(global->append_config_path, game_path, sizeof(global->append_config_path));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
strlcpy(global->append_config_path, game_path, sizeof(global->append_config_path));
|
strlcpy(global->append_config_path, game_path, sizeof(global->append_config_path));
|
||||||
RARCH_LOG("Game-specific configuration found at %s. Appending.\n", game_path);
|
|
||||||
|
|
||||||
|
RARCH_LOG("Game-specific configuration found at %s. Appending.\n", game_path);
|
||||||
should_append = true;
|
should_append = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
RARCH_LOG("No game-specific configuration found at %s.\n", game_path);
|
RARCH_LOG("No game-specific configuration found at %s.\n", game_path);
|
||||||
|
|
||||||
if(should_append)
|
if (should_append && !config_load_file(global->config_path, false))
|
||||||
{
|
return false;
|
||||||
if(!config_load_file(global->config_path, false))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true; /* only means no errors were caught */
|
return true; /* only means no errors were caught */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue