diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index 51ffcfe703..175668e544 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "../../general.h" @@ -463,7 +464,8 @@ static bool gl_glsl_load_source_path(struct video_shader_pass *pass, const char *path) { ssize_t len; - bool ret = read_file(path, (void**)&pass->source.string.vertex, &len); + bool ret = retro_read_file(path, + (void**)&pass->source.string.vertex, &len); if (!ret || len <= 0) return false; @@ -472,7 +474,8 @@ static bool gl_glsl_load_source_path(struct video_shader_pass *pass, return pass->source.string.fragment && pass->source.string.vertex; } -static bool gl_glsl_compile_programs(glsl_shader_data_t *glsl, GLuint *gl_prog) +static bool gl_glsl_compile_programs( + glsl_shader_data_t *glsl, GLuint *gl_prog) { unsigned i; @@ -487,9 +490,11 @@ static bool gl_glsl_compile_programs(glsl_shader_data_t *glsl, GLuint *gl_prog) * load the file here, and pretend * we were really using XML all along. */ - if (*pass->source.path && !gl_glsl_load_source_path(pass, pass->source.path)) + if (*pass->source.path && !gl_glsl_load_source_path( + pass, pass->source.path)) { - RARCH_ERR("Failed to load GLSL shader: %s.\n", pass->source.path); + RARCH_ERR("Failed to load GLSL shader: %s.\n", + pass->source.path); return false; } *pass->source.path = '\0'; diff --git a/gfx/video_state_python.c b/gfx/video_state_python.c index d644b96b83..f99cbe0b8a 100644 --- a/gfx/video_state_python.c +++ b/gfx/video_state_python.c @@ -21,6 +21,7 @@ #include #include +#include #include "video_state_python.h" #include "../dynamic.h" @@ -302,7 +303,9 @@ py_state_t *py_state_new(const char *script, * compiled with MSVC. */ ssize_t len; char *script_ = NULL; - bool ret = read_file(script, (void**)&script_, &len); + bool ret = retro_read_file + (script, (void**)&script_, &len); + if (!ret || len < 0) { RARCH_ERR("Python: Failed to read script\n"); diff --git a/patch.c b/patch.c index 2b14e98063..9362a94277 100644 --- a/patch.c +++ b/patch.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "patch.h" @@ -491,7 +492,7 @@ static bool apply_patch_content(uint8_t **buf, ssize_t ret_size = *size; uint8_t *ret_buf = *buf; - if (!read_file(patch_path, &patch_data, &patch_size)) + if (!retro_read_file(patch_path, &patch_data, &patch_size)) return false; if (patch_size < 0) return false; diff --git a/tasks/task_database.c b/tasks/task_database.c index fd7f1511ab..627e4d62f3 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -201,7 +201,7 @@ static int database_info_iterate_playlist( default: { ssize_t ret; - int read_from = read_file(name, (void**)&db_state->buf, &ret); + int read_from = retro_read_file(name, (void**)&db_state->buf, &ret); #ifdef HAVE_ZLIB const struct file_archive_file_backend *stream_backend = file_archive_get_default_file_backend();