summaryrefslogtreecommitdiff
path: root/include/ptrveloc.h
diff options
context:
space:
mode:
authorSimon Thum <simon.thum@gmx.de>2008-07-29 10:07:43 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2008-08-04 15:13:30 +0930
commit18e9fd69fe01298d825b46415b9c6bd86c75dfe5 (patch)
tree583287d5af9822e60714bacc932c5e6508c3890d /include/ptrveloc.h
parent25882af6d3359e5ae42c927c555f5b257ba5665c (diff)
dix: use average of pointer accel profile
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include/ptrveloc.h')
-rw-r--r--include/ptrveloc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index 2d42dda29..384f9a6f2 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -53,7 +53,7 @@ struct _DeviceVelocityRec;
*/
typedef float (*PointerAccelerationProfileFunc)
(struct _DeviceVelocityRec* /*pVel*/,
- float /*threshold*/, float /*acc*/);
+ float /*velocity*/, float /*threshold*/, float /*acc*/);
/**
* a filter stage contains the data for adaptive IIR filtering.
@@ -78,6 +78,7 @@ typedef struct _FilterStage {
typedef struct _DeviceVelocityRec {
FilterStage filters[MAX_VELOCITY_FILTERS];
float velocity; /* velocity as guessed by algorithm */
+ float last_velocity; /* previous velocity estimate */
int lrm_time; /* time the last motion event was processed */
int last_dx, last_dy; /* last motion delta */
int last_diff; /* last time-difference */
@@ -88,6 +89,7 @@ typedef struct _DeviceVelocityRec {
short reset_time; /* config: reset non-visible state after # ms */
short use_softening; /* config: use softening of mouse values */
float coupling; /* config: max. divergence before coupling */
+ Bool average_accel; /* config: average acceleration over velocity */
PointerAccelerationProfileFunc Profile;
PointerAccelerationProfileFunc deviceSpecificProfile;
void* profile_private;/* extended data, see SetAccelerationProfile() */