If rendering plug-in supports several screens we cannot assume
only screen 0 as valid screenId.
Also if the layer is assigned to some screen, containing screenId
should be set.
One layer could also be assigned to more than one
screen at the same time, in this case only the last screenId is set
Signed-off-by: Eugen Friedrich <efriedrich@de.adit-jv.com>
ExecutionResult ScreenDumpCommand::execute(ICommandExecutor* executor)
{
+ uint length = 0;
+ uint i = 0;
+ uint* IDs = executor->getScreenIDs(&length);
ExecutionResult result = ExecutionFailed;
RendererList& m_rendererList = *(executor->getRendererList());
LOG_INFO("ScreenDumpCommand", "making screenshot, output file: " << m_filename);
- status = (m_id == 0);
+ for (i = 0; i < length; i++)
+ {
+ if (m_id == IDs[i])
+ {
+ status = true;
+ }
+ }
if (status)
{
if (renderer)
{
- renderer->doScreenShot(m_filename);
+ renderer->doScreenShot(m_filename, m_id);
}
}
result = ExecutionSuccessRedraw;
if (layer)
{
LOG_DEBUG("ScreenSetRenderOrderCommand", "Adding Layer: " << m_array[i] << " to current render order");
+ layer->setContainingScreenId(m_screenID);
scene.getCurrentRenderOrder(m_screenID).push_back(layer);
result = ExecutionSuccessRedraw;
}