summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/synaptics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 1d32093..074bcb8 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2740,7 +2740,7 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
double dtime = (hw->millis - priv->scroll.last_millis) / 1000.0;
double ddy = para->coasting_friction * dtime;
- priv->scroll.delta_y += priv->scroll.coast_speed_y * dtime * para->scroll_dist_vert;
+ priv->scroll.delta_y += priv->scroll.coast_speed_y * dtime * abs(para->scroll_dist_vert);
delay = MIN(delay, POLL_MS);
if (abs(priv->scroll.coast_speed_y) < ddy) {
priv->scroll.coast_speed_y = 0;
@@ -2755,7 +2755,7 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
if (priv->scroll.coast_speed_x) {
double dtime = (hw->millis - priv->scroll.last_millis) / 1000.0;
double ddx = para->coasting_friction * dtime;
- priv->scroll.delta_x += priv->scroll.coast_speed_x * dtime * para->scroll_dist_vert;
+ priv->scroll.delta_x += priv->scroll.coast_speed_x * dtime * abs(para->scroll_dist_horiz);
delay = MIN(delay, POLL_MS);
if (abs(priv->scroll.coast_speed_x) < ddx) {
priv->scroll.coast_speed_x = 0;