mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
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:
@@ -262,12 +262,16 @@ static void set_lua_variables(lua_State *L)
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* screen offsets, exported as e.g. SCREEN['END_Y'] */
|
/* 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[] =
|
table_key screenopts[] =
|
||||||
{
|
{
|
||||||
{ "OFF_X", g_settings.screen_StartX },
|
{ "OFF_X", g_settings.screen_StartX },
|
||||||
{ "OFF_Y", g_settings.screen_StartY },
|
{ "OFF_Y", g_settings.screen_StartY },
|
||||||
{ "END_X", g_settings.screen_EndX },
|
{ "END_X", g_settings.screen_EndX },
|
||||||
{ "END_Y", g_settings.screen_EndY },
|
{ "END_Y", g_settings.screen_EndY },
|
||||||
|
{ "X_RES", xRes },
|
||||||
|
{ "Y_RES", yRes },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
table_key menureturn[] =
|
table_key menureturn[] =
|
||||||
|
@@ -34,7 +34,7 @@ extern "C" {
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define LUA_API_VERSION_MAJOR 1
|
#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 */
|
/* this is stored as userdata in the lua_State */
|
||||||
struct CLuaData
|
struct CLuaData
|
||||||
|
Reference in New Issue
Block a user