mirror of
https://github.com/libretro/RetroArch
synced 2025-03-19 16:21:30 +00:00
Merge pull request #1594 from SAKUJ0/master
Some clean-up and consistency, no actual code changes
This commit is contained in:
commit
e61bb7673e
@ -1654,19 +1654,22 @@ bool config_load_override(void)
|
|||||||
global_t *global = global_get_ptr(); /* global pointer */
|
global_t *global = global_get_ptr(); /* global pointer */
|
||||||
settings_t *settings = config_get_ptr(); /* config pointer */
|
settings_t *settings = config_get_ptr(); /* config pointer */
|
||||||
|
|
||||||
//early return in case a library isn't loaded
|
|
||||||
if(!global->system.info.library_name || !strcmp(global->system.info.library_name,"No Core"))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
RARCH_LOG("Game name: %s\n",global->basename);
|
|
||||||
RARCH_LOG("Core name: %s\n",global->system.info.library_name);
|
|
||||||
|
|
||||||
if (!global || !settings )
|
if (!global || !settings )
|
||||||
{
|
{
|
||||||
RARCH_ERR("Could not obtain global pointer or configuration file pointer to retrieve path of retroarch.cfg.\n");
|
RARCH_ERR("Could not obtain global pointer or configuration file pointer to retrieve path of retroarch.cfg.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//early return in case a library isn't loaded
|
||||||
|
if (!global->system.info.library_name || !strcmp(global->system.info.library_name,"No Core"))
|
||||||
|
{
|
||||||
|
RARCH_LOG("No library loaded, not using overrides.\n");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
RARCH_LOG("Game name: %s\n",global->basename);
|
||||||
|
RARCH_LOG("Core name: %s\n",global->system.info.library_name);
|
||||||
|
|
||||||
/* Config directory: config_directory. */
|
/* Config directory: config_directory. */
|
||||||
if (settings->menu_config_directory) /* Try RGUI path setting first */
|
if (settings->menu_config_directory) /* Try RGUI path setting first */
|
||||||
strlcpy(config_directory, settings->menu_config_directory, PATH_MAX_LENGTH);
|
strlcpy(config_directory, settings->menu_config_directory, PATH_MAX_LENGTH);
|
||||||
@ -1727,18 +1730,15 @@ bool config_load_override(void)
|
|||||||
}
|
}
|
||||||
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))
|
||||||
{
|
|
||||||
if(!config_load_file(global->config_path, false))
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
return true; /* only means no errors were caught */
|
return true; /* only means no errors were caught */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user