mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Create config_active_core_path_is_empty
This commit is contained in:
parent
2be127c04a
commit
16908435bb
@ -3146,6 +3146,12 @@ const char *config_get_active_core_path(void)
|
||||
return settings->path.libretro;
|
||||
}
|
||||
|
||||
bool config_active_core_path_is_empty(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return !settings->path.libretro[0];
|
||||
}
|
||||
|
||||
void config_set_active_core_path(const char *path)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
@ -604,6 +604,8 @@ void config_set_active_core_path(const char *path);
|
||||
|
||||
void config_clear_active_core_path(void);
|
||||
|
||||
bool config_active_core_path_is_empty(void);
|
||||
|
||||
void config_free_state(void);
|
||||
|
||||
settings_t *config_get_ptr(void);
|
||||
|
@ -405,12 +405,11 @@ static void frontend_gx_process_args(int *argc, char *argv[])
|
||||
{
|
||||
#ifndef IS_SALAMANDER
|
||||
char path[PATH_MAX_LENGTH] = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/* A big hack: sometimes Salamander doesn't save the new core
|
||||
* it loads on first boot, so we make sure
|
||||
* settings->path.libretro is set here. */
|
||||
if (!settings->path.libretro[0] && *argc >= 1 && strrchr(argv[0], '/'))
|
||||
* active core path is set here. */
|
||||
if (config_active_core_path_is_empty() && *argc >= 1 && strrchr(argv[0], '/'))
|
||||
{
|
||||
strlcpy(path, strrchr(argv[0], '/') + 1, sizeof(path));
|
||||
if (path_file_exists(path))
|
||||
|
Loading…
x
Reference in New Issue
Block a user