From: Michal MalĂ˝ Date: Wed, 8 Jul 2015 15:17:01 +0000 (+0200) Subject: Stop and erase combinable effect only when it is playing. X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=0985115a87521733aee4d314352f0c8eb361042e;p=KLGD_FF_plugin.git Stop and erase combinable effect only when it is playing. --- diff --git a/klgd_ff_plugin.c b/klgd_ff_plugin.c index 0602cb5..5af7d0e 100644 --- a/klgd_ff_plugin.c +++ b/klgd_ff_plugin.c @@ -156,8 +156,10 @@ static int ffpl_handle_combinable_effects(struct klgd_plugin_private *priv, stru return 0; } /* No combinable effects are active, remove the effect from device */ - printk(KERN_NOTICE "KLGDFF: No combinable effects are active, erase the combined effect from device\n"); - priv->combined_effect.change = FFPL_TO_ERASE; + if (priv->combined_effect.state != FFPL_EMPTY) { + printk(KERN_NOTICE "KLGDFF: No combinable effects are active, erase the combined effect from device\n"); + priv->combined_effect.change = FFPL_TO_ERASE; + } } return 0;