Maybe fix some Mac OS X crash.

This commit is contained in:
TSnake41 2020-05-08 01:42:43 +02:00
parent 0eef1d6d90
commit c59880f170
3 changed files with 10 additions and 4 deletions

View File

@ -12,7 +12,7 @@ MODULES := raymath rlgl easings gestures physac raygui
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
else ifeq ($(shell uname),Darwin) else ifeq ($(shell uname),Darwin)
LDFLAGS += -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL LDFLAGS += -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL -Wl,"-pagezero_size 10000 -image_base 100000000"
else else
LDFLAGS += -ldl -lX11 -lpthread LDFLAGS += -ldl -lX11 -lpthread
endif endif

View File

@ -152,8 +152,12 @@ int main(int argc, const char **argv)
lua_State *L = luaL_newstate(); lua_State *L = luaL_newstate();
luaL_openlibs(L); luaL_openlibs(L);
if (L == NULL) if (L == NULL) {
puts("RAYLUA: Unable to initialize Lua."); puts("RAYLUA: Unable to initialize Lua.");
return 0;
}
luaL_openlibs(L);
/* Populate arg. */ /* Populate arg. */
lua_newtable(L); lua_newtable(L);

View File

@ -27,11 +27,13 @@
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
lua_State *L = luaL_newstate(); lua_State *L = luaL_newstate();
luaL_openlibs(L);
if (L == NULL) if (L == NULL) {
puts("RAYLUA: Unable to initialize Lua."); puts("RAYLUA: Unable to initialize Lua.");
return 0;
}
luaL_openlibs(L);
lua_newtable(L); lua_newtable(L);
int i = 0; int i = 0;