diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c index e8c3b80311..7523645d8c 100644 --- a/gfx/video_shader_parse.c +++ b/gfx/video_shader_parse.c @@ -666,7 +666,7 @@ bool video_shader_write_preset(const char *path, * * The returned string needs to be freed. */ -char *video_shader_read_reference_path(const char *path) +static char *video_shader_read_reference_path(const char *path) { /* We want shader presets that point to other presets. * @@ -694,17 +694,15 @@ char *video_shader_read_reference_path(const char *path) RFILE *file = NULL; char *line = NULL; - if (string_is_empty(path)) + if (string_is_empty(path) || !path_is_valid(path)) return NULL; - if (!path_is_valid(path)) - return NULL; - - file = filestream_open(path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE); - + file = filestream_open(path, + RETRO_VFS_FILE_ACCESS_READ, + RETRO_VFS_FILE_ACCESS_HINT_NONE); if (!file) return NULL; - line = filestream_getline(file); + line = filestream_getline(file); filestream_close(file); if (line && !strncmp("#reference", line, STRLEN_CONST("#reference"))) diff --git a/gfx/video_shader_parse.h b/gfx/video_shader_parse.h index deb79212a6..a7b6576660 100644 --- a/gfx/video_shader_parse.h +++ b/gfx/video_shader_parse.h @@ -174,17 +174,6 @@ bool video_shader_write_preset(const char *path, const char *shader_dir, const struct video_shader *shader, bool reference); -/** - * video_shader_read_reference_path: - * @path : File to read - * - * Returns: the reference path of a preset if it exists, - * otherwise returns NULL. - * - * The returned string needs to be freed. - */ -char *video_shader_read_reference_path(const char *path); - /** * video_shader_read_preset: * @path : File to read