bool FFBDevice::startEffect(const int idx, FFBEffectTypes type, std::shared_ptr<FFBEffectParameters> params)
{
+ bool update = false;
std::shared_ptr<FFBEffect> effect = FFBEffectFactory::createEffect(type);
if (effect == nullptr) {
qDebug() << "Unable to create effect";
qDebug() << "Recreating effect" << idx;
} else {
effect->setInternalIdx(m_effects[idx]->internalIdx());
+ update = true;
qDebug() << "Updating effect" << idx;
}
}
delete kernelEff;
return false;
}
+ if (update)
+ return true;
m_effects[idx]->setInternalIdx(kernelEff->id);
m_effects[idx]->setStatus(FFBEffect::FFBEffectStatus::STOPPED);