mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
CLuaInstance: Fix transfer of color values in...
...PaintBox() and RenderString() for coolstream hardware
- Set Lua api version to 1.11
Origin commit data
------------------
Branch: ni/coolstream
Commit: 45569a736a
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-11-23 (Mon, 23 Nov 2015)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -660,8 +660,12 @@ int CLuaInstance::PaintBox(lua_State *L)
|
|||||||
y = luaL_checkint(L, 3);
|
y = luaL_checkint(L, 3);
|
||||||
w = luaL_checkint(L, 4);
|
w = luaL_checkint(L, 4);
|
||||||
h = luaL_checkint(L, 5);
|
h = luaL_checkint(L, 5);
|
||||||
|
#if HAVE_COOL_HARDWARE
|
||||||
|
c = luaL_checkunsigned(L, 6);
|
||||||
|
#else
|
||||||
/* luaL_checkint does not like e.g. 0xffcc0000 on powerpc (returns INT_MAX) instead */
|
/* luaL_checkint does not like e.g. 0xffcc0000 on powerpc (returns INT_MAX) instead */
|
||||||
c = (unsigned int)luaL_checknumber(L, 6);
|
c = (unsigned int)luaL_checknumber(L, 6);
|
||||||
|
#endif
|
||||||
if (count > 6)
|
if (count > 6)
|
||||||
radius = luaL_checkint(L, 7);
|
radius = luaL_checkint(L, 7);
|
||||||
if (count > 7)
|
if (count > 7)
|
||||||
@@ -874,7 +878,11 @@ int CLuaInstance::RenderString(lua_State *L)
|
|||||||
x = luaL_checkint(L, 4);
|
x = luaL_checkint(L, 4);
|
||||||
y = luaL_checkint(L, 5);
|
y = luaL_checkint(L, 5);
|
||||||
if (numargs > 5)
|
if (numargs > 5)
|
||||||
|
#if HAVE_COOL_HARDWARE
|
||||||
|
c = luaL_checkunsigned(L, 6);
|
||||||
|
#else
|
||||||
c = luaL_checkint(L, 6);
|
c = luaL_checkint(L, 6);
|
||||||
|
#endif
|
||||||
if (numargs > 6)
|
if (numargs > 6)
|
||||||
w = luaL_checkint(L, 7);
|
w = luaL_checkint(L, 7);
|
||||||
else
|
else
|
||||||
|
@@ -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 10
|
#define LUA_API_VERSION_MINOR 11
|
||||||
|
|
||||||
/* 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