mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Reduce some configuration dependencies
This commit is contained in:
parent
d918c1791a
commit
1105d1019d
@ -583,6 +583,7 @@ bool video_shader_resolve_parameters(config_file_t *conf,
|
||||
* See: video_shader_read_preset
|
||||
**/
|
||||
bool video_shader_write_preset(const char *path,
|
||||
const char *shader_dir,
|
||||
const struct video_shader *shader, bool reference)
|
||||
{
|
||||
/* We need to clean up paths to be able to properly process them
|
||||
@ -596,7 +597,7 @@ bool video_shader_write_preset(const char *path,
|
||||
|
||||
fill_pathname_join(
|
||||
preset_dir,
|
||||
config_get_ptr()->paths.directory_video_shader,
|
||||
shader_dir,
|
||||
"presets",
|
||||
sizeof(preset_dir));
|
||||
|
||||
|
@ -170,6 +170,7 @@ struct video_shader
|
||||
* See: video_shader_read_preset
|
||||
**/
|
||||
bool video_shader_write_preset(const char *path,
|
||||
const char *shader_dir,
|
||||
const struct video_shader *shader, bool reference);
|
||||
|
||||
/**
|
||||
|
@ -229,6 +229,7 @@ static bool menu_shader_manager_save_preset_internal(
|
||||
{
|
||||
bool ret = false;
|
||||
enum rarch_shader_type type = RARCH_SHADER_NONE;
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *preset_path = NULL;
|
||||
size_t i = 0;
|
||||
char fullname[PATH_MAX_LENGTH];
|
||||
@ -271,7 +272,9 @@ static bool menu_shader_manager_save_preset_internal(
|
||||
{
|
||||
preset_path = fullname;
|
||||
|
||||
ret = video_shader_write_preset(preset_path, shader, save_reference);
|
||||
ret = video_shader_write_preset(preset_path,
|
||||
settings->paths.directory_video_shader,
|
||||
shader, save_reference);
|
||||
|
||||
if (ret)
|
||||
RARCH_LOG("Saved shader preset to %s.\n", preset_path);
|
||||
@ -281,7 +284,6 @@ static bool menu_shader_manager_save_preset_internal(
|
||||
else
|
||||
{
|
||||
const char *dirs[3] = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
char config_directory[PATH_MAX_LENGTH];
|
||||
|
||||
config_directory[0] = '\0';
|
||||
@ -306,7 +308,9 @@ static bool menu_shader_manager_save_preset_internal(
|
||||
|
||||
preset_path = buffer;
|
||||
|
||||
ret = video_shader_write_preset(preset_path, shader, save_reference);
|
||||
ret = video_shader_write_preset(preset_path,
|
||||
settings->paths.directory_video_shader,
|
||||
shader, save_reference);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user