fix(indev): scroll_ throw_vect cannot converge to 0 when vect is negative

fixes: #3431
This commit is contained in:
Gabor Kiss-Vamosi
2022-07-01 10:24:29 +02:00
parent 4572a0c6c9
commit e5c11f1f68

View File

@@ -902,11 +902,8 @@ static void indev_proc_press(_lv_indev_proc_t * proc)
proc->types.pointer.vect.x = proc->types.pointer.act_point.x - proc->types.pointer.last_point.x;
proc->types.pointer.vect.y = proc->types.pointer.act_point.y - proc->types.pointer.last_point.y;
proc->types.pointer.scroll_throw_vect.x = (proc->types.pointer.scroll_throw_vect.x * 4) >> 3;
proc->types.pointer.scroll_throw_vect.y = (proc->types.pointer.scroll_throw_vect.y * 4) >> 3;
proc->types.pointer.scroll_throw_vect.x += (proc->types.pointer.vect.x * 4) >> 3;
proc->types.pointer.scroll_throw_vect.y += (proc->types.pointer.vect.y * 4) >> 3;
proc->types.pointer.scroll_throw_vect.x = (proc->types.pointer.scroll_throw_vect.x + proc->types.pointer.vect.x) / 2;
proc->types.pointer.scroll_throw_vect.y = (proc->types.pointer.scroll_throw_vect.y + proc->types.pointer.vect.y) / 2;
proc->types.pointer.scroll_throw_vect_ori = proc->types.pointer.scroll_throw_vect;