fix effect overlay not evaluated correctly

This commit is contained in:
redPanther 2016-10-14 20:13:45 +02:00 committed by GitHub
parent 6a06dfabdd
commit f881a0abe3

View File

@ -43,15 +43,15 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const QJsonObject & jsonEffectCo
efxPathList << ":/effects/"; efxPathList << ":/effects/";
QStringList disableList; QStringList disableList;
QJsonArray::ConstIterator iterPaths = paths.begin(); for(auto p : paths)
QJsonArray::ConstIterator iterDisabledEfx = disabledEfx.begin(); {
efxPathList << p.toString();
for(; iterPaths != paths.end() and iterDisabledEfx != disabledEfx.end() ; ++iterPaths, ++iterDisabledEfx)
{
efxPathList << (*iterPaths).toString();
disableList << (*iterDisabledEfx).toString();
} }
for(auto efx : disabledEfx)
{
disableList << efx.toString();
}
std::map<QString, EffectDefinition> availableEffects; std::map<QString, EffectDefinition> availableEffects;
foreach (const QString & path, efxPathList ) foreach (const QString & path, efxPathList )
{ {
@ -83,6 +83,10 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const QJsonObject & jsonEffectCo
} }
Info(_log, "%d effects loaded from directory %s", efxCount, path.toUtf8().constData()); Info(_log, "%d effects loaded from directory %s", efxCount, path.toUtf8().constData());
} }
else
{
Warning(_log, "Effect path \"%s\" does not exist",path.toUtf8().constData() );
}
} }
foreach(auto item, availableEffects) foreach(auto item, availableEffects)