diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2020-09-21 20:16:04 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2020-09-21 20:16:04 +0300 |
| commit | fff91b28e1260d634487e9fdce4bac316b993c0e (patch) | |
| tree | 2eeaa24c0ed97a4576b4a256780c417db2c70439 | |
| parent | 2cff9e0684900f367070f003a1daa80347a34dcb (diff) | |
| download | hid-tmff2-fff91b28e1260d634487e9fdce4bac316b993c0e.tar.gz hid-tmff2-fff91b28e1260d634487e9fdce4bac316b993c0e.zip | |
F1 2018 fix
| -rw-r--r-- | hid-tmt300rs.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/hid-tmt300rs.c b/hid-tmt300rs.c index aa1db0a..7fbe829 100644 --- a/hid-tmt300rs.c +++ b/hid-tmt300rs.c @@ -925,6 +925,10 @@ static int t300rs_timer_helper(struct t300rs_device_entry *t300rs){ __clear_bit(FF_EFFECT_QUEUE_UPDATE, &state->flags); if(state->count){ + state->count--; + } + + if(state->count){ __set_bit(FF_EFFECT_QUEUE_START, &state->flags); } } @@ -950,9 +954,6 @@ static int t300rs_timer_helper(struct t300rs_device_entry *t300rs){ return ret; } - if(state->count){ - state->count--; - } } if(test_bit(FF_EFFECT_QUEUE_STOP, &state->flags)){ @@ -1042,11 +1043,16 @@ static int t300rs_play(struct input_dev *dev, int effect_id, int value){ t300rs->effects_used++; }*/ + + state->count = value; state->start_time = JIFFIES2MS(jiffies); __set_bit(FF_EFFECT_QUEUE_START, &state->flags); - } else if(test_bit(FF_EFFECT_PLAYING, &state->flags)){ + if(test_bit(FF_EFFECT_QUEUE_STOP, &state->flags)) + __clear_bit(FF_EFFECT_QUEUE_STOP, &state->flags); + + } else { __set_bit(FF_EFFECT_QUEUE_STOP, &state->flags); } |
