s32 _x;
s32 _y;
- if (!ffpl_process_memless(priv, ueff))
- continue;
-
if (eff->state != FFPL_STARTED)
continue;
ffpl_ramp_to_x_y(eff, &_x, &_y, now);
break;
default:
- printk(KERN_ERR "KLGDFF: Combinable constant force effect handler tried to process an uncombinable effect! This should not happen!\n");
+ continue;
break;
}
struct ffpl_effect *eff = &priv->effects[idx];
struct ff_effect *ueff = &eff->active;
+ if (eff->state != FFPL_STARTED)
+ continue;
+
switch (ueff->type) {
case FF_RUMBLE:
ffpl_add_rumble(ueff, &strong_mag, &weak_mag, &dir);
break;
break;
default:
- printk(KERN_ERR "KLGDFF: Combinable rumble effect handler tried to process an uncombinable effect! This should not happen!\n");
+ continue;
break;
}
}
goto out;
}
- /* Handle combined effect here */
+ /* Handle combined constant force effect here */
ret = ffpl_handle_state_change(priv, *s, &priv->combined_effect_cf, now);
if (ret) {
printk(KERN_WARNING "KLGDFF: Cannot get command stream for combined constant force effect\n");
goto out;
}
+ ret = ffpl_handle_state_change(priv, *s, &priv->combined_effect_rumble, now);
+ if (ret) {
+ printk(KERN_WARNING "KLGDFF: Cannot get command stream for combined rumble effect\n");
+ goto out;
+ }
+
for (idx = 0; idx < priv->effect_count; idx++) {
struct ffpl_effect *eff = &priv->effects[idx];
text = kasprintf(GFP_KERNEL, "Playing FF_CONSTANT, level: %d, dir: %u, X: %d, Y: %d", level, effect->direction, x, y);
break;
}
+ case FF_RUMBLE:
+ text = kasprintf(GFP_KERNEL, "Playing FF_RUMBLE, strong: %u, weak: %u, direction: %u\n", effect->u.rumble.strong_magnitude,
+ effect->u.rumble.weak_magnitude, effect->direction);
+ break;
default:
text = kasprintf(GFP_KERNEL, "Playing effect, type %d, id %d, repeat %d", effect->type, effect->id, repeat);
break;
text = kasprintf(GFP_KERNEL, "Updating FF_CONSTANT, level: %d, dir: %u, X: %d, Y: %d", level, effect->direction, x, y);
break;
}
+ case FF_RUMBLE:
+ text = kasprintf(GFP_KERNEL, "Updating FF_RUMBLE, strong: %u, weak: %u, direction: %u\n", effect->u.rumble.strong_magnitude,
+ effect->u.rumble.weak_magnitude, effect->direction);
+ break;
default:
text = kasprintf(GFP_KERNEL, "Updating, type %d, id %d", effect->type, effect->id);
break;
text = kasprintf(GFP_KERNEL, "Uploading and starting FF_CONSTANT, level: %d, dir: %u, X: %d, Y: %d", level, effect->direction, x, y);
break;
}
+ case FF_RUMBLE:
+ text = kasprintf(GFP_KERNEL, "Uploading and starting FF_RUMBLE, strong: %u, weak: %u, direction: %u\n", effect->u.rumble.strong_magnitude,
+ effect->u.rumble.weak_magnitude, effect->direction);
+ break;
default:
text = kasprintf(GFP_KERNEL, "Uploading and starting effect, type %d, id %d, repeat %d", effect->type, effect->id, repeat);
break;