aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_graphics.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-28 22:10:27 +0800
committerchai <chaifix@163.com>2018-07-28 22:10:27 +0800
commit52693d68f7181d707e1a192d67a617145b358394 (patch)
tree5a39bcdf225def306738ead6683cd224e2c5762d /src/lua/graphics/luaopen_graphics.cpp
parentd033400614e7e2c0ff49e5100c81e937e5818e74 (diff)
*update
Diffstat (limited to 'src/lua/graphics/luaopen_graphics.cpp')
-rw-r--r--src/lua/graphics/luaopen_graphics.cpp12
1 files changed, 7 insertions, 5 deletions
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;
}