mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
CLuaInstance::PlayFile: Function now returns the status of buttons
- Set Lua api version to 1.1
return code defined LUA Variables
--------------------------------------------------
0 = normal exit PLAYSTATE.NORMAL
1 = aborted by stop button PLAYSTATE.STOP
2 = next button PLAYSTATE.NEXT
3 = prev button PLAYSTATE.PREV
Origin commit data
------------------
Commit: b56be92d59
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-09-04 (Fri, 04 Sep 2015)
Origin message was:
------------------
CLuaInstance::PlayFile: Function now returns the status of buttons
- Set Lua api version to 1.1
return code defined LUA Variables
--------------------------------------------------
0 = normal exit PLAYSTATE.NORMAL
1 = aborted by stop button PLAYSTATE.STOP
2 = next button PLAYSTATE.NEXT
3 = prev button PLAYSTATE.PREV
This commit is contained in:
@@ -277,7 +277,6 @@ static void set_lua_variables(lua_State *L)
|
||||
{ "EXIT_REPAINT", menu_return::RETURN_EXIT_REPAINT },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
table_key apiversion[] =
|
||||
{
|
||||
{ "MAJOR", LUA_API_VERSION_MAJOR },
|
||||
@@ -285,6 +284,15 @@ static void set_lua_variables(lua_State *L)
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
table_key playstate[] =
|
||||
{
|
||||
{ "NORMAL", CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL },
|
||||
{ "STOP", CMoviePlayerGui::PLUGIN_PLAYSTATE_STOP },
|
||||
{ "NEXT", CMoviePlayerGui::PLUGIN_PLAYSTATE_NEXT },
|
||||
{ "PREV", CMoviePlayerGui::PLUGIN_PLAYSTATE_PREV },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
/* list of environment variable arrays to be exported */
|
||||
lua_envexport e[] =
|
||||
{
|
||||
@@ -294,6 +302,7 @@ static void set_lua_variables(lua_State *L)
|
||||
{ "CORNER", corners },
|
||||
{ "MENU_RETURN", menureturn },
|
||||
{ "APIVERSION", apiversion },
|
||||
{ "PLAYSTATE", playstate },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -727,8 +736,10 @@ int CLuaInstance::PlayFile(lua_State *L)
|
||||
std::string si2(info2);
|
||||
std::string sf(fname);
|
||||
CMoviePlayerGui::getInstance().SetFile(st, sf, si1, si2);
|
||||
CMoviePlayerGui::getInstance().exec(NULL, "http");
|
||||
return 0;
|
||||
CMoviePlayerGui::getInstance().exec(NULL, "http_lua");
|
||||
int ret = CMoviePlayerGui::getInstance().getKeyPressed();
|
||||
lua_pushinteger(L, ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CLuaInstance::strFind(lua_State *L)
|
||||
|
Reference in New Issue
Block a user