tablet: drop delta array, provided by the tablet_axis struct now

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
This commit is contained in:
Peter Hutterer 2016-01-06 16:20:38 +10:00
parent d524313d2b
commit f5200c5325
3 changed files with 3 additions and 7 deletions

View file

@ -430,9 +430,9 @@ tablet_handle_wheel(struct tablet_dispatch *tablet,
a = LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL;
if (bit_is_set(tablet->changed_axes, a)) {
*wheel_discrete = tablet->deltas[a];
*wheel_discrete = tablet->axes.wheel_discrete;
tablet->axes.wheel = normalize_wheel(tablet,
tablet->deltas[a]);
tablet->axes.wheel_discrete);
} else {
tablet->axes.wheel = 0;
*wheel_discrete = 0;
@ -457,7 +457,6 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
axes.pressure = tablet_handle_pressure(tablet, device, tool);
axes.distance = tablet_handle_distance(tablet, device);
axes.slider = tablet_handle_slider(tablet, device);
axes.tilt = tablet_handle_tilt(tablet, device);
/* We must check ROTATION_Z after TILT_X/Y so that the tilt axes are
@ -602,7 +601,7 @@ tablet_process_relative(struct tablet_dispatch *tablet,
break;
}
set_bit(tablet->changed_axes, axis);
tablet->deltas[axis] = -1 * e->value;
tablet->axes.wheel_discrete = -1 * e->value;
tablet_set_status(tablet, TABLET_AXES_UPDATED);
break;
default:

View file

@ -54,7 +54,6 @@ struct tablet_dispatch {
unsigned int status;
unsigned char changed_axes[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
struct tablet_axes axes;
double deltas[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
unsigned char axis_caps[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
/* Only used for tablets that don't report serial numbers */

View file

@ -2240,8 +2240,6 @@ tablet_notify_proximity(struct libinput_device *device,
changed_axes,
sizeof(proximity_event->changed_axes));
/* deltas are always 0 on prox-in/out */
post_device_event(device,
time,
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,