summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 8d710a7..9b83a8f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -7,12 +7,18 @@ int main(int argc, char** argv)
return 0;
}
- honey_window window;
lua_State* L;
- if (!honey_setup(&L, &window))
+ if (!honey_setup(&L))
return 1;
+ lua_getglobal(L, "honey");
+ lua_getfield(L, -1, "window");
+ lua_getfield(L, -1, "internal");
+ honey_window_information* info = lua_touserdata(L, -1);
+ lua_pop(L, 2);
+ honey_window window = info->window;
+
char* script;
honey_result res = honey_format_string(&script,
"%s/main.lua",