From 90edde72a72906a7d8b92b44d97e7066231a5a89 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 8 Dec 2015 06:16:06 +0100 Subject: [PATCH] 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: https://github.com/neutrino-images/ni-neutrino/commit/d06594dd605a218cc0bc13ae4404c7bb704aa429 Author: Michael Liebmann Date: 2015-12-08 (Tue, 08 Dec 2015) ------------------ This commit was generated by Migit --- src/gui/lua/luainstance.cpp | 11 +++++++---- src/gui/lua/luainstance.h | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index f223e1f98..a18e82741 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -744,12 +744,15 @@ int CLuaInstance::deleteSavedScreen(lua_State *L) int CLuaInstance::GetRevision(lua_State *L) { - unsigned int ret = 0; + unsigned int rev = 0; + std::string hw = ""; #if HAVE_COOL_HARDWARE - ret = cs_get_revision(); + hw = "Coolstream"; #endif - lua_pushinteger(L, ret); - return 1; + rev = cs_get_revision(); + lua_pushinteger(L, rev); + lua_pushstring(L, hw.c_str()); + return 2; } int CLuaInstance::PaintBox(lua_State *L) diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index dfb2dc8ef..d952203c3 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -34,7 +34,7 @@ extern "C" { #include #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 21 +#define LUA_API_VERSION_MINOR 22 typedef std::pair fontmap_pair_t; typedef std::map fontmap_t;