free(accel);
}
-struct motion_filter_interface accelerator_interface_flat = {
+static const struct motion_filter_interface accelerator_interface_flat = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT,
.filter = accelerator_filter_flat,
.filter_constant = accelerator_filter_noop_flat,
return true;
}
-struct motion_filter_interface accelerator_interface_low_dpi = {
+static const struct motion_filter_interface accelerator_interface_low_dpi = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
.filter = accelerator_filter_low_dpi,
.filter_constant = accelerator_filter_noop,
return factor;
}
-struct motion_filter_interface accelerator_interface = {
+static const struct motion_filter_interface accelerator_interface = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
.filter = accelerator_filter_linear,
.filter_constant = accelerator_filter_noop,
struct motion_filter {
double speed_adjustment; /* normalized [-1, 1] */
- struct motion_filter_interface *interface;
+ const struct motion_filter_interface *interface;
};
struct pointer_tracker {
free(accel_filter);
}
-struct motion_filter_interface accelerator_interface_tablet = {
+static const struct motion_filter_interface accelerator_interface_tablet = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT,
.filter = tablet_accelerator_filter_flat,
.filter_constant = NULL,
free(accel);
}
-struct motion_filter_interface accelerator_interface_touchpad_flat = {
+static const struct motion_filter_interface accelerator_interface_touchpad_flat = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT,
.filter = accelerator_filter_touchpad_flat,
.filter_constant = accelerator_filter_noop_touchpad_flat,
return factor * X230_MAGIC_SLOWDOWN / X230_TP_MAGIC_LOW_RES_FACTOR;
}
-struct motion_filter_interface accelerator_interface_x230 = {
+static const struct motion_filter_interface accelerator_interface_x230 = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
.filter = accelerator_filter_x230,
.filter_constant = accelerator_filter_constant_x230,
return factor * TP_MAGIC_SLOWDOWN;
}
-struct motion_filter_interface accelerator_interface_touchpad = {
+static const struct motion_filter_interface accelerator_interface_touchpad = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
.filter = accelerator_filter_touchpad,
.filter_constant = touchpad_constant_filter,
free(accel_filter);
}
-struct motion_filter_interface accelerator_interface_trackpoint = {
+static const struct motion_filter_interface accelerator_interface_trackpoint = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
.filter = trackpoint_accelerator_filter,
.filter_constant = trackpoint_accelerator_filter_noop,