]> Devoid-pointer.net GitWeb - KLGD_FF_plugin.git/commitdiff
Stop and erase combinable effect only when it is playing.
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 8 Jul 2015 15:17:01 +0000 (17:17 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 8 Jul 2015 15:17:01 +0000 (17:17 +0200)
klgd_ff_plugin.c

index 0602cb5293ffbcd5c1097cf2b03d80cc8ff2d2f7..5af7d0e070ba9d802b2a49e572c2a8d2e2dfde0c 100644 (file)
@@ -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;