CLuaInstance::GetRevision: Add second return value as a string...

...for hardware identification

 - Set Lua api version to 1.22


Origin commit data
------------------
Branch: ni/coolstream
Commit: d06594dd60
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-12-08 (Tue, 08 Dec 2015)



------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2015-12-08 06:16:06 +01:00
parent 994ff285d3
commit 90edde72a7
2 changed files with 8 additions and 5 deletions

View File

@@ -744,12 +744,15 @@ int CLuaInstance::deleteSavedScreen(lua_State *L)
int CLuaInstance::GetRevision(lua_State *L) int CLuaInstance::GetRevision(lua_State *L)
{ {
unsigned int ret = 0; unsigned int rev = 0;
std::string hw = "";
#if HAVE_COOL_HARDWARE #if HAVE_COOL_HARDWARE
ret = cs_get_revision(); hw = "Coolstream";
#endif #endif
lua_pushinteger(L, ret); rev = cs_get_revision();
return 1; lua_pushinteger(L, rev);
lua_pushstring(L, hw.c_str());
return 2;
} }
int CLuaInstance::PaintBox(lua_State *L) int CLuaInstance::PaintBox(lua_State *L)

View File

@@ -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 21 #define LUA_API_VERSION_MINOR 22
typedef std::pair<lua_Integer, Font*> fontmap_pair_t; typedef std::pair<lua_Integer, Font*> fontmap_pair_t;
typedef std::map<lua_Integer, Font*> fontmap_t; typedef std::map<lua_Integer, Font*> fontmap_t;