diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index a0785436c..6ea65173d 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -262,12 +262,16 @@ static void set_lua_variables(lua_State *L) }; /* screen offsets, exported as e.g. SCREEN['END_Y'] */ + lua_Integer xRes = (lua_Integer)CFrameBuffer::getInstance()->getScreenWidth(true); + lua_Integer yRes = (lua_Integer)CFrameBuffer::getInstance()->getScreenHeight(true); table_key screenopts[] = { { "OFF_X", g_settings.screen_StartX }, { "OFF_Y", g_settings.screen_StartY }, { "END_X", g_settings.screen_EndX }, { "END_Y", g_settings.screen_EndY }, + { "X_RES", xRes }, + { "Y_RES", yRes }, { NULL, 0 } }; table_key menureturn[] = diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index 1c0887d72..99bd0b4b0 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -34,7 +34,7 @@ extern "C" { #include #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 8 +#define LUA_API_VERSION_MINOR 9 /* this is stored as userdata in the lua_State */ struct CLuaData