dix: indentation fixes for pointer acceleration

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Simon Thum 2012-04-02 18:49:53 +02:00 committed by Peter Hutterer
parent 31174565ec
commit 693a31e704
3 changed files with 11 additions and 19 deletions

View File

@ -1332,13 +1332,10 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
/* global list of acceleration schemes */ /* global list of acceleration schemes */
ValuatorAccelerationRec pointerAccelerationScheme[] = { ValuatorAccelerationRec pointerAccelerationScheme[] = {
{PtrAccelNoOp, NULL, NULL, NULL, NULL} {PtrAccelNoOp, NULL, NULL, NULL, NULL},
,
{PtrAccelPredictable, acceleratePointerPredictable, NULL, {PtrAccelPredictable, acceleratePointerPredictable, NULL,
InitPredictableAccelerationScheme, AccelerationDefaultCleanup} InitPredictableAccelerationScheme, AccelerationDefaultCleanup},
, {PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL, NULL},
{PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL, NULL}
,
{-1, NULL, NULL, NULL, NULL} /* terminator */ {-1, NULL, NULL, NULL, NULL} /* terminator */
}; };
@ -1375,8 +1372,7 @@ InitPointerAccelerationScheme(DeviceIntPtr dev, int scheme)
if (pointerAccelerationScheme[i].AccelInitProc) { if (pointerAccelerationScheme[i].AccelInitProc) {
if (!pointerAccelerationScheme[i].AccelInitProc(dev, if (!pointerAccelerationScheme[i].AccelInitProc(dev,
&pointerAccelerationScheme &pointerAccelerationScheme[i])) {
[i])) {
return FALSE; return FALSE;
} }
} }

View File

@ -788,7 +788,8 @@ ComputeAcceleration(DeviceIntPtr dev,
result += result +=
4.0f * BasicComputeAcceleration(dev, vel, 4.0f * BasicComputeAcceleration(dev, vel,
(vel->last_velocity + (vel->last_velocity +
vel->velocity) / 2, threshold, vel->velocity) / 2,
threshold,
acc); acc);
result /= 6.0f; result /= 6.0f;
DebugAccelF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n", DebugAccelF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n",

View File

@ -101,48 +101,43 @@ typedef struct _PredictableAccelSchemeRec {
} PredictableAccelSchemeRec, *PredictableAccelSchemePtr; } PredictableAccelSchemeRec, *PredictableAccelSchemePtr;
extern _X_EXPORT void extern _X_EXPORT void
InitVelocityData(DeviceVelocityPtr vel); InitVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT void extern _X_EXPORT void
InitTrackers(DeviceVelocityPtr vel, int ntracker); InitTrackers(DeviceVelocityPtr vel, int ntracker);
extern _X_EXPORT BOOL extern _X_EXPORT BOOL
ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time); ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time);
extern _X_EXPORT double extern _X_EXPORT double
BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
double velocity, double threshold, double acc); double velocity, double threshold, double acc);
extern _X_EXPORT void extern _X_EXPORT void
FreeVelocityData(DeviceVelocityPtr vel); FreeVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT int extern _X_EXPORT int
SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
extern _X_EXPORT DeviceVelocityPtr extern _X_EXPORT DeviceVelocityPtr
GetDevicePredictableAccelData(DeviceIntPtr dev); GetDevicePredictableAccelData(DeviceIntPtr dev);
extern _X_EXPORT void extern _X_EXPORT void
SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel, SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
PointerAccelerationProfileFunc profile); PointerAccelerationProfileFunc profile);
extern _X_INTERNAL void extern _X_INTERNAL void
AccelerationDefaultCleanup(DeviceIntPtr dev); AccelerationDefaultCleanup(DeviceIntPtr dev);
extern _X_INTERNAL Bool extern _X_INTERNAL Bool
InitPredictableAccelerationScheme(DeviceIntPtr dev, InitPredictableAccelerationScheme(DeviceIntPtr dev,
struct _ValuatorAccelerationRec *protoScheme); struct _ValuatorAccelerationRec *protoScheme);
extern _X_INTERNAL void extern _X_INTERNAL void
acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val, acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime); CARD32 evtime);
extern _X_INTERNAL void extern _X_INTERNAL void
acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val, acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime); CARD32 evtime);