diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gl/honey_gl.h | 1 | ||||
-rw-r--r-- | src/gl/honey_window.c (renamed from src/gl/honey_gl.c) | 0 | ||||
-rw-r--r-- | src/main.c | 7 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gl/honey_gl.h b/src/gl/honey_gl.h index 8d5cdd9..08210a0 100644 --- a/src/gl/honey_gl.h +++ b/src/gl/honey_gl.h @@ -13,5 +13,6 @@ struct honey_window { extern struct honey_window window; void setup_window(lua_State *L, int tbl_index); +void setup_gl(lua_State *L, int tbl_index); #endif diff --git a/src/gl/honey_gl.c b/src/gl/honey_window.c index 6a113d1..6a113d1 100644 --- a/src/gl/honey_gl.c +++ b/src/gl/honey_window.c @@ -41,15 +41,16 @@ int main(int argc, char **argv) /* load main script */ honey_debug("loading '%s'\n", options.main_script); - if (luaL_loadfile(L, options.main_script)) { + if (luaL_loadfile(L, options.main_script) != 0) { const char *error = lua_tostring(L, -1); honey_fatal("%s\n", error); return 1; } - if (!hs_call(L, 0, 0)) { + if (hs_call(L, 0, 0) != 0) { + honey_debug("stack size: %d\n", lua_gettop(L)); const char *error = lua_tostring(L, -1); - honey_fatal("unhandled error: %s", error); + honey_fatal("error loading main file: %s\n", error); goto close; /* sorry */ } |