mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 05:12:25 +08:00
Ignore effects if there's none in the list
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
4641420bb3
commit
69657a0014
@ -222,6 +222,7 @@ void CImage::setup ()
|
||||
this->m_image->getMaterial ()
|
||||
);
|
||||
|
||||
if (this->getImage ()->getEffects ().empty () == false)
|
||||
{
|
||||
// generate the effects used by this material
|
||||
auto cur = this->getImage ()->getEffects ().begin ();
|
||||
@ -248,21 +249,19 @@ void CImage::setup ()
|
||||
auto passEnd = (*materialCur)->getPasses ().end ();
|
||||
|
||||
for (; passCur != passEnd; passCur ++)
|
||||
{
|
||||
this->m_passes.push_back (*passCur);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add the final passes too
|
||||
if (this->m_material->getPasses ().empty () == false)
|
||||
{
|
||||
auto passCur = this->m_material->getPasses ().begin ();
|
||||
auto passEnd = this->m_material->getPasses ().end ();
|
||||
auto cur = this->m_material->getPasses ().begin ();
|
||||
auto end = this->m_material->getPasses ().end ();
|
||||
|
||||
for (; passCur != passEnd; passCur ++)
|
||||
this->m_passes.push_back (*passCur);
|
||||
for (; cur != end; cur ++)
|
||||
this->m_passes.push_back (*cur);
|
||||
}
|
||||
|
||||
// calculate full animation time (if any)
|
||||
|
Loading…
Reference in New Issue
Block a user