CLuaInstance: Add screen constants 'X_RES' and 'Y_RES'

- Set Lua api version to 1.9


Origin commit data
------------------
Branch: ni/coolstream
Commit: 24881e4228
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-11-14 (Sat, 14 Nov 2015)



------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2015-11-14 19:15:03 +01:00
parent 0397eaa085
commit fc58a94b10
2 changed files with 5 additions and 1 deletions

View File

@@ -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[] =

View File

@@ -34,7 +34,7 @@ extern "C" {
#include <vector>
#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