mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
EffectModule::getEffect() is now a preprocessor directive
Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
@@ -172,7 +172,7 @@ int EffectEngine::runEffectScript(const QString &script, const QString &name, co
|
||||
connect(effect, &Effect::setInput, _hyperion, &Hyperion::setInput, Qt::QueuedConnection);
|
||||
connect(effect, &Effect::setInputImage, _hyperion, &Hyperion::setInputImage, Qt::QueuedConnection);
|
||||
connect(effect, &QThread::finished, this, &EffectEngine::effectFinished);
|
||||
connect(_hyperion, &Hyperion::finished, effect, &Effect::setInteruptionFlag, Qt::DirectConnection);
|
||||
connect(_hyperion, &Hyperion::finished, effect, &Effect::requestInterruption, Qt::DirectConnection);
|
||||
_activeEffects.push_back(effect);
|
||||
|
||||
// start the effect
|
||||
@@ -186,9 +186,9 @@ void EffectEngine::channelCleared(int priority)
|
||||
{
|
||||
for (Effect * effect : _activeEffects)
|
||||
{
|
||||
if (effect->getPriority() == priority)
|
||||
if (effect->getPriority() == priority && !effect->isInterruptionRequested())
|
||||
{
|
||||
effect->setInteruptionFlag();
|
||||
effect->requestInterruption();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,9 +197,9 @@ void EffectEngine::allChannelsCleared()
|
||||
{
|
||||
for (Effect * effect : _activeEffects)
|
||||
{
|
||||
if (effect->getPriority() != 254)
|
||||
if (effect->getPriority() != 254 && !effect->isInterruptionRequested())
|
||||
{
|
||||
effect->setInteruptionFlag();
|
||||
effect->requestInterruption();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,7 +207,7 @@ void EffectEngine::allChannelsCleared()
|
||||
void EffectEngine::effectFinished()
|
||||
{
|
||||
Effect* effect = qobject_cast<Effect*>(sender());
|
||||
if (!effect->hasInteruptionFlag())
|
||||
if (!effect->isInterruptionRequested())
|
||||
{
|
||||
// effect stopped by itself. Clear the channel
|
||||
_hyperion->clear(effect->getPriority());
|
||||
|
Reference in New Issue
Block a user