plugins: use optional flag to handle background behavior of lua plugins

Old behavior is untouched, but Lua plugins which are using neutrino-lua APi
can manage background behavior of their windows by themselves.
This flag allows more flexibility.
This commit is contained in:
2022-12-05 13:56:47 +01:00
parent 516d1e1d98
commit df7b3e73b1

View File

@@ -393,8 +393,14 @@ int CPlugins::startLuaPlugin(int number)
#if 0
frameBuffer->ClearFB();
#endif
videoDecoder->Pig(-1, -1, -1, -1);
frameBuffer->paintBackground();
std::string keep_bg_flag = "/tmp/.keep_background";
if (!file_exists(keep_bg_flag))
{
videoDecoder->Pig(-1, -1, -1, -1);
frameBuffer->paintBackground();
}
else
remove(keep_bg_flag.c_str());
return plugin_list[number].menu_return;
}