From 294777166ff9135a98ac8f61e21c1ee360a2c496 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 3 Jun 2016 00:11:41 +0200 Subject: [PATCH] video_shader_parse.c - use filestream --- gfx/video_shader_parse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c index bd0dc18317..aabb059e25 100644 --- a/gfx/video_shader_parse.c +++ b/gfx/video_shader_parse.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "../general.h" #include "../verbosity.h" @@ -410,13 +411,13 @@ bool video_shader_resolve_parameters(config_file_t *conf, for (i = 0; i < shader->passes; i++) { char line[4096] = {0}; - FILE *file = fopen(shader->pass[i].source.path, "r"); + RFILE *file = filestream_open(shader->pass[i].source.path, RFILE_MODE_READ, -1); if (!file) continue; while (shader->num_parameters < ARRAY_SIZE(shader->parameters) - && fgets(line, sizeof(line), file)) + && filestream_gets(file, line, sizeof(line))) { int ret = sscanf(line, "#pragma parameter %63s \"%63[^\"]\" %f %f %f %f", @@ -441,7 +442,7 @@ bool video_shader_resolve_parameters(config_file_t *conf, param++; } - fclose(file); + filestream_close(file); } if (conf)