From c7171a1fe795911a925f47af15352deb6609b001 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 8 Jul 2020 13:18:01 +0300 Subject: small changes, nothing on value (I assume) --- hid-tmff2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hid-tmff2.c') diff --git a/hid-tmff2.c b/hid-tmff2.c index 66c712b..b26185f 100644 --- a/hid-tmff2.c +++ b/hid-tmff2.c @@ -354,9 +354,11 @@ static int tmff_play(struct input_dev *dev, void *data, ep = &usbif->cur_altsetting->endpoint[1]; - switch (effect->type) { + switch (effect->type) { case FF_CONSTANT: - x = tmff_scale_s8(effect->u.ramp.start_level, + // this only works with input_ff_create_memless, which clamps + // constant forces to s8 for some reason + x = tmff_scale_s8(effect->u.constant.level, ff_field->logical_minimum, ff_field->logical_maximum); -- cgit v1.3