From 0b7b482468b05a674c2393c7569ada24242b459c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Thu, 9 Jul 2015 00:52:38 +0200 Subject: [PATCH] Handle transition from STARTED to STOPPED correctly for combinable effects. --- klgd_ff_plugin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/klgd_ff_plugin.c b/klgd_ff_plugin.c index c42183e..a6a3dde 100644 --- a/klgd_ff_plugin.c +++ b/klgd_ff_plugin.c @@ -163,11 +163,16 @@ static int ffpl_handle_combinable_effects(struct klgd_plugin_private *priv, stru needs_update = true; printk(KERN_NOTICE "KLGDFF: Altered combinable effect, total active effects %lu\n", active_effects); break; + case FFPL_TO_STOP: + if (eff->state == FFPL_STARTED) + needs_update = true; case FFPL_TO_UPLOAD: eff->state = FFPL_UPLOADED; - printk(KERN_NOTICE "KLGDFF: Combinable effect to upload, marking as uploaded\n"); + printk(KERN_NOTICE "KLGDFF: Combinable effect to upload/stop, marking as uploaded\n"); break; default: + if (eff->state != FFPL_STARTED) + break; needs_update = true; eff->state = FFPL_EMPTY; printk(KERN_NOTICE "KLGDFF: Stopped combinable effect, total active effects %lu\n", active_effects); -- 2.43.5