diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-07-27 23:49:14 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-07-27 23:49:14 -0700 |
commit | c22c2b011eaad9ce65114437bb237ccd3c6e30eb (patch) | |
tree | d3792f6e51dcfd2db02ee78e6d00920b92306a46 /render_sdl.c | |
parent | 9cf93af158f6964501bb2be8912a19bb572a2170 (diff) |
Use binary mode for reading shaders and config files so we actually get the number of bytes we expect
Diffstat (limited to 'render_sdl.c')
-rwxr-xr-x | render_sdl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/render_sdl.c b/render_sdl.c index a2f094e..608d33c 100755 --- a/render_sdl.c +++ b/render_sdl.c @@ -117,13 +117,13 @@ GLuint load_shader(char * fname, GLenum shader_type) { char * parts[] = {get_home_dir(), "/.config/blastem/shaders/", fname}; char * shader_path = alloc_concat_m(3, parts); - FILE * f = fopen(shader_path, "r"); + FILE * f = fopen(shader_path, "rb"); free(shader_path); if (!f) { parts[0] = get_exe_dir(); parts[1] = "/shaders/"; shader_path = alloc_concat_m(3, parts); - f = fopen(shader_path, "r"); + f = fopen(shader_path, "rb"); free(shader_path); if (!f) { warning("Failed to open shader file %s for reading\n", fname); |