mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-07 18:07:27 +00:00
Update path_set
This commit is contained in:
parent
7e1a61570a
commit
0b1270458c
@ -2234,7 +2234,7 @@ bool config_load_override(void)
|
|||||||
RARCH_LOG("[overrides] core-specific overrides found at %s.\n", core_path);
|
RARCH_LOG("[overrides] core-specific overrides found at %s.\n", core_path);
|
||||||
|
|
||||||
config_file_free(new_conf);
|
config_file_free(new_conf);
|
||||||
path_set_config_append(core_path);
|
path_set(RARCH_PATH_CONFIG_APPEND, core_path);
|
||||||
|
|
||||||
should_append = true;
|
should_append = true;
|
||||||
}
|
}
|
||||||
@ -2262,7 +2262,7 @@ bool config_load_override(void)
|
|||||||
else
|
else
|
||||||
strlcpy(temp_path, game_path, sizeof(temp_path));
|
strlcpy(temp_path, game_path, sizeof(temp_path));
|
||||||
|
|
||||||
path_set_config_append(temp_path);
|
path_set(RARCH_PATH_CONFIG_APPEND, temp_path);
|
||||||
|
|
||||||
should_append = true;
|
should_append = true;
|
||||||
}
|
}
|
||||||
@ -2533,7 +2533,7 @@ bool config_load_shader_preset(void)
|
|||||||
/* Game shader preset exists, load it. */
|
/* Game shader preset exists, load it. */
|
||||||
RARCH_LOG("Shaders: game-specific shader preset found at %s.\n", game_path);
|
RARCH_LOG("Shaders: game-specific shader preset found at %s.\n", game_path);
|
||||||
|
|
||||||
path_set_default_shader_preset(settings->path.shader);
|
path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->path.shader);
|
||||||
strlcpy(settings->path.shader, game_path, sizeof(settings->path.shader));
|
strlcpy(settings->path.shader, game_path, sizeof(settings->path.shader));
|
||||||
config_file_free(new_conf);
|
config_file_free(new_conf);
|
||||||
return true;
|
return true;
|
||||||
@ -2563,7 +2563,7 @@ bool config_load_shader_preset(void)
|
|||||||
|
|
||||||
/* Core shader preset exists, load it. */
|
/* Core shader preset exists, load it. */
|
||||||
RARCH_LOG("Shaders: core-specific shader preset found at %s.\n", core_path);
|
RARCH_LOG("Shaders: core-specific shader preset found at %s.\n", core_path);
|
||||||
path_set_default_shader_preset(settings->path.shader);
|
path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->path.shader);
|
||||||
strlcpy(settings->path.shader, core_path, sizeof(settings->path.shader));
|
strlcpy(settings->path.shader, core_path, sizeof(settings->path.shader));
|
||||||
config_file_free(new_conf);
|
config_file_free(new_conf);
|
||||||
return true;
|
return true;
|
||||||
|
21
paths.c
21
paths.c
@ -507,6 +507,14 @@ bool path_set(enum rarch_path_type type, const char *path)
|
|||||||
strlcpy(path_libretro, path,
|
strlcpy(path_libretro, path,
|
||||||
sizeof(path_libretro));
|
sizeof(path_libretro));
|
||||||
break;
|
break;
|
||||||
|
case RARCH_PATH_DEFAULT_SHADER_PRESET:
|
||||||
|
strlcpy(path_default_shader_preset, path,
|
||||||
|
sizeof(path_default_shader_preset));
|
||||||
|
break;
|
||||||
|
case RARCH_PATH_CONFIG_APPEND:
|
||||||
|
strlcpy(path_config_append_file, path,
|
||||||
|
sizeof(path_config_append_file));
|
||||||
|
break;
|
||||||
case RARCH_PATH_CONFIG:
|
case RARCH_PATH_CONFIG:
|
||||||
strlcpy(path_config_file, path,
|
strlcpy(path_config_file, path,
|
||||||
sizeof(path_config_file));
|
sizeof(path_config_file));
|
||||||
@ -606,14 +614,6 @@ void path_clear_core_options(void)
|
|||||||
*path_core_options_file = '\0';
|
*path_core_options_file = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
bool path_set_default_shader_preset(const char *preset)
|
|
||||||
{
|
|
||||||
if (!preset)
|
|
||||||
return false;
|
|
||||||
strlcpy(path_default_shader_preset, preset,
|
|
||||||
sizeof(path_default_shader_preset));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const char *path_get_core_options(void)
|
const char *path_get_core_options(void)
|
||||||
@ -645,11 +645,6 @@ void path_clear_content(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void path_set_config_append(const char *path)
|
|
||||||
{
|
|
||||||
strlcpy(path_config_append_file, path, sizeof(path_config_append_file));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool path_get_content(char **fullpath)
|
bool path_get_content(char **fullpath)
|
||||||
{
|
{
|
||||||
if (!fullpath)
|
if (!fullpath)
|
||||||
|
2
paths.h
2
paths.h
@ -37,7 +37,9 @@ enum rarch_path_type
|
|||||||
RARCH_PATH_CORE,
|
RARCH_PATH_CORE,
|
||||||
RARCH_PATH_CONFIG,
|
RARCH_PATH_CONFIG,
|
||||||
RARCH_PATH_CONTENT,
|
RARCH_PATH_CONTENT,
|
||||||
|
RARCH_PATH_CONFIG_APPEND,
|
||||||
RARCH_PATH_CORE_OPTIONS,
|
RARCH_PATH_CORE_OPTIONS,
|
||||||
|
RARCH_PATH_DEFAULT_SHADER_PRESET,
|
||||||
RARCH_PATH_SUBSYSTEM
|
RARCH_PATH_SUBSYSTEM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ static void retroarch_parse_input(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case RA_OPT_APPENDCONFIG:
|
case RA_OPT_APPENDCONFIG:
|
||||||
path_set_config_append(optarg);
|
path_set(RARCH_PATH_CONFIG_APPEND, optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RA_OPT_SIZE:
|
case RA_OPT_SIZE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user