Commit 693a31e7 authored by simonthum's avatar simonthum Committed by Peter Hutterer
Browse files

dix: indentation fixes for pointer acceleration


Signed-off-by: simonthum's avatarSimon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 31174565
......@@ -1332,13 +1332,10 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
/* global list of acceleration schemes */
ValuatorAccelerationRec pointerAccelerationScheme[] = {
{PtrAccelNoOp, NULL, NULL, NULL, NULL}
,
{PtrAccelNoOp, NULL, NULL, NULL, NULL},
{PtrAccelPredictable, acceleratePointerPredictable, NULL,
InitPredictableAccelerationScheme, AccelerationDefaultCleanup}
,
{PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL, NULL}
,
InitPredictableAccelerationScheme, AccelerationDefaultCleanup},
{PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL, NULL},
{-1, NULL, NULL, NULL, NULL} /* terminator */
};
......@@ -1375,8 +1372,7 @@ InitPointerAccelerationScheme(DeviceIntPtr dev, int scheme)
if (pointerAccelerationScheme[i].AccelInitProc) {
if (!pointerAccelerationScheme[i].AccelInitProc(dev,
&pointerAccelerationScheme
[i])) {
&pointerAccelerationScheme[i])) {
return FALSE;
}
}
......
......@@ -788,7 +788,8 @@ ComputeAcceleration(DeviceIntPtr dev,
result +=
4.0f * BasicComputeAcceleration(dev, vel,
(vel->last_velocity +
vel->velocity) / 2, threshold,
vel->velocity) / 2,
threshold,
acc);
result /= 6.0f;
DebugAccelF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n",
......
......@@ -101,48 +101,43 @@ typedef struct _PredictableAccelSchemeRec {
} PredictableAccelSchemeRec, *PredictableAccelSchemePtr;
extern _X_EXPORT void
InitVelocityData(DeviceVelocityPtr vel);
InitVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT void
InitTrackers(DeviceVelocityPtr vel, int ntracker);
InitTrackers(DeviceVelocityPtr vel, int ntracker);
extern _X_EXPORT BOOL
ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time);
extern _X_EXPORT double
BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
double velocity, double threshold, double acc);
extern _X_EXPORT void
FreeVelocityData(DeviceVelocityPtr vel);
FreeVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT int
SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
extern _X_EXPORT DeviceVelocityPtr
GetDevicePredictableAccelData(DeviceIntPtr dev);
extern _X_EXPORT void
SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
PointerAccelerationProfileFunc profile);
extern _X_INTERNAL void
AccelerationDefaultCleanup(DeviceIntPtr dev);
AccelerationDefaultCleanup(DeviceIntPtr dev);
extern _X_INTERNAL Bool
InitPredictableAccelerationScheme(DeviceIntPtr dev,
struct _ValuatorAccelerationRec *protoScheme);
extern _X_INTERNAL void
acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
extern _X_INTERNAL void
acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment