CLuaInstance: Add script function zapitStopPlayBack

- For safe running ShowPicture() in the plugin
 - Set Lua api version to 1.19
This commit is contained in:
M. Liebmann
2015-12-08 06:16:00 +01:00
parent ffea6559c9
commit 0a008ab308
4 changed files with 19 additions and 1 deletions

View File

@@ -27,6 +27,7 @@
#include <global.h>
#include <system/debug.h>
#include <gui/movieplayer.h>
#include <zapit/zapit.h>
#include <video.h>
#include <neutrino.h>
@@ -97,3 +98,18 @@ int CLuaInstance::PlayFile(lua_State *L)
lua_pushinteger(L, ret);
return 1;
}
int CLuaInstance::zapitStopPlayBack(lua_State *L)
{
bool stop = true;
int numargs = lua_gettop(L);
if (numargs > 1)
stop = _luaL_checkbool(L, 2);
if (stop) {
CMoviePlayerGui::getInstance().stopPlayBack();
g_Zapit->stopPlayBack();
}
else
g_Zapit->startPlayBack();
return 0;
}