mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
CLuaInstance: The first call to Lua::PlayFile() block restoreNeutrino
- Running restoreNeutrino when exiting the plugin and
function is blocked
- Set Lua api version to 1.18
Origin commit data
------------------
Branch: ni/coolstream
Commit: ffea6559c9
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-12-08 (Tue, 08 Dec 2015)
Origin message was:
------------------
CLuaInstance: The first call to Lua::PlayFile() block restoreNeutrino
- Running restoreNeutrino when exiting the plugin and
function is blocked
- Set Lua api version to 1.18
------------------
This commit was generated by Migit
This commit is contained in:
@@ -512,6 +512,11 @@ void CLuaInstance::runScript(const char *fileName, std::vector<std::string> *arg
|
||||
DisplayErrorMessage(lua_tostring(lua, -1), "Lua Script Error:");
|
||||
if (error_string)
|
||||
*error_string = std::string(lua_tostring(lua, -1));
|
||||
/* restoreNeutrino at plugin crash, when blocked from plugin */
|
||||
if (CMoviePlayerGui::getInstance().getBlockedFromPlugin()) {
|
||||
CMoviePlayerGui::getInstance().setBlockedFromPlugin(false);
|
||||
CMoviePlayerGui::getInstance().restoreNeutrino();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -660,6 +665,7 @@ int CLuaInstance::NewWindow(lua_State *L)
|
||||
CFBWindow *W = new CFBWindow(x, y, w, h);
|
||||
D->fbwin = W;
|
||||
D->rcinput = g_RCInput;
|
||||
D->moviePlayerBlocked = false;
|
||||
lua_boxpointer(L, D);
|
||||
luaL_getmetatable(L, className);
|
||||
lua_setmetatable(L, -2);
|
||||
@@ -1156,6 +1162,16 @@ int CLuaInstance::GCWindow(lua_State *L)
|
||||
}
|
||||
CNeutrinoFonts::getInstance()->deleteDynFontExtAll();
|
||||
|
||||
/* restoreNeutrino at plugin closing, when blocked from plugin */
|
||||
if (w->moviePlayerBlocked &&
|
||||
CMoviePlayerGui::getInstance().getBlockedFromPlugin() &&
|
||||
CMoviePlayerGui::getInstance().Playing()) {
|
||||
// printf(">>>>[%s:%d] (restoreNeutrino()) moviePlayerBlocked: %d\n", __func__, __LINE__, w->moviePlayerBlocked);
|
||||
CMoviePlayerGui::getInstance().setBlockedFromPlugin(false);
|
||||
w->moviePlayerBlocked = false;
|
||||
CMoviePlayerGui::getInstance().restoreNeutrino();
|
||||
}
|
||||
|
||||
delete w->fbwin;
|
||||
w->rcinput = NULL;
|
||||
delete w;
|
||||
|
Reference in New Issue
Block a user