Change a for loop to touchpad_for_each_touch

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Return a delta of 0 for invalid scroll directions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix bad history point retrieval

t->history.index is unsigned, causing a bad calculation when index - when
should've caused a negative number.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Update the timestamp for the right touch

If the slot changes, make sure we update the timestamp for new touch, not the
old one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
config: fix check for allowed range

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Drop a leftover printf

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>