From 66aedc9c1a87c8811be4dba263dbcd7ec026cc70 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 28 May 2015 23:04:49 -0700 Subject: Fix crash bug in windows build --- Makefile | 2 +- render_sdl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fc6a29a..eed9d6d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ MEM:=mem_win.o BLASTEM:=blastem.exe CC:=wine gcc.exe -CFLAGS:=-g -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"C:/MinGW/usr/include/SDL2" -DGLEW_STATIC +CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"C:/MinGW/usr/include/SDL2" -DGLEW_STATIC LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lglu32 -mwindows CPU:=i686 diff --git a/render_sdl.c b/render_sdl.c index 38b7ed4..9de86dd 100644 --- a/render_sdl.c +++ b/render_sdl.c @@ -107,7 +107,7 @@ const GLushort element_data[] = {0, 1, 2, 3}; GLuint load_shader(char * fname, GLenum shader_type) { - char * parts[] = {getenv("HOME"), "/.config/blastem/shaders/", fname}; + char * parts[] = {get_home_dir(), "/.config/blastem/shaders/", fname}; char * shader_path = alloc_concat_m(3, parts); FILE * f = fopen(shader_path, "r"); free(shader_path); -- cgit v1.2.3