diff options
Diffstat (limited to 'hw/kdrive/src/kinput.c')
-rw-r--r-- | hw/kdrive/src/kinput.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 1fc6e71d1..a34350a6a 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -1373,6 +1373,7 @@ KdMouseAccelerate (DeviceIntPtr device, int *dx, int *dy) PtrCtrl *pCtrl = &device->ptrfeed->ctrl; double speed = sqrt (*dx * *dx + *dy * *dy); double accel; +#ifdef QUADRATIC_ACCELERATION double m; /* @@ -1389,6 +1390,11 @@ KdMouseAccelerate (DeviceIntPtr device, int *dx, int *dy) m = (((double) pCtrl->num / (double) pCtrl->den - 1.0) / ((double) pCtrl->threshold * 2.0)); accel = m * speed + 1; +#else + accel = 1.0; + if (speed > pCtrl->threshold) + accel = (double) pCtrl->num / pCtrl->den; +#endif *dx = accel * *dx; *dy = accel * *dy; } |