Commit 95125a7c authored by Peter Hutterer's avatar Peter Hutterer
Browse files

dix: fix ptraccel debugging printfs

This is mostly sigsafe code, so use sigsave printf. And update some fields
to double that used to be int.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: Keith Packard's avatarKeith Packard <>
parent cde7cbe9
......@@ -77,7 +77,7 @@ DeletePredictableAccelerationProperties(DeviceIntPtr,
#define DebugAccelF ErrorF
#define DebugAccelF ErrorFSigSafe
#define DebugAccelF(...) /* */
......@@ -566,7 +566,7 @@ FeedTrackers(DeviceVelocityPtr vel, double dx, double dy, int cur_t)
vel->tracker[n].dy = 0.0;
vel->tracker[n].time = cur_t;
vel->tracker[n].dir = GetDirection(dx, dy);
DebugAccelF("(dix prtacc) motion [dx: %i dy: %i dir:%i diff: %i]\n",
DebugAccelF("(dix prtacc) motion [dx: %f dy: %f dir:%d diff: %d]\n",
dx, dy, vel->tracker[n].dir,
cur_t - vel->tracker[vel->cur_tracker].time);
vel->cur_tracker = n;
......@@ -667,7 +667,7 @@ QueryTrackers(DeviceVelocityPtr vel, int cur_t)
MotionTracker *tracker = TRACKER(vel, used_offset);
DebugAccelF("(dix prtacc) result: offset %i [dx: %i dy: %i diff: %i]\n",
DebugAccelF("(dix prtacc) result: offset %i [dx: %f dy: %f diff: %i]\n",
used_offset, tracker->dx, tracker->dy,
cur_t - tracker->time);
......@@ -799,7 +799,7 @@ ComputeAcceleration(DeviceIntPtr dev,
result = BasicComputeAcceleration(dev, vel,
vel->velocity, threshold, acc);
DebugAccelF("(dix ptracc) profile sample [%.2f] is %.3f\n",
vel->velocity, res);
vel->velocity, result);
return result;
......@@ -1122,8 +1122,7 @@ acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val, CARD32 evtime)
valuator_mask_set_double(val, 0, mult * dx);
if (dy != 0.0)
valuator_mask_set_double(val, 1, mult * dy);
DebugAccelF("pos (%i | %i) delta x:%.3f y:%.3f\n", mult * dx,
mult * dy);
DebugAccelF("delta x:%.3f y:%.3f\n", mult * dx, mult * dy);
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