From 52693d68f7181d707e1a192d67a617145b358394 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 28 Jul 2018 22:10:27 +0800 Subject: *update --- src/lua/graphics/luaopen_graphics.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lua/graphics/luaopen_graphics.cpp') diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp index 2d1ff57..a394cc3 100644 --- a/src/lua/graphics/luaopen_graphics.cpp +++ b/src/lua/graphics/luaopen_graphics.cpp @@ -27,12 +27,14 @@ namespace lua */ static int l_init(lua_State* L) { - WindowSystem* wnd = WindowSystem::get(); - WindowSystem::Setting setting; + Window* wnd = Window::get(); + Window::Setting setting; setting.width = luax_getfield_integer(L, 1, "width"); setting.height = luax_getfield_integer(L, 1, "height"); setting.title = luax_getfield_string(L, 1, "title"); setting.vsync = luax_getfield_bool(L, 1, "vsync"); + setting.fullscreen = luax_getfield_bool(L, 1, "fullscreen"); + setting.resizable= luax_getfield_bool(L, 1, "resizable"); if (!wnd->init(&setting)) { luax_pushboolean(L, false); @@ -44,7 +46,7 @@ namespace lua static int l_destroy(lua_State* L) { - WindowSystem* wnd = WindowSystem::get(); + Window* wnd = Window::get(); wnd->quit(); return 0; } @@ -54,7 +56,7 @@ namespace lua */ static int l_getSize(lua_State* L) { - WindowSystem* wnd = WindowSystem::get(); + Window* wnd = Window::get(); luax_pushnumber(L, wnd->getW()); luax_pushnumber(L, wnd->getH()); return 2; @@ -131,7 +133,7 @@ namespace lua */ static int l_present(lua_State* L) { - WindowSystem::get()->swapBuffers(); + Window::get()->swapBuffers(); return 0; } -- cgit v1.1-26-g67d0