summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp b/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
index 6557eada..3e63e07d 100644
--- a/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
+++ b/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
@@ -57,6 +57,10 @@ void FTNoIR_Tracker::start_tracker(QFrame*)
// no error checking here, errors result in SIGFPE
a_min[i] = libevdev_get_abs_minimum(node, ot_libevdev_joystick_axes[i]);
a_max[i] = libevdev_get_abs_maximum(node, ot_libevdev_joystick_axes[i]);
+
+ if (a_min[i] == a_max[i])
+ a_max[i]++;
+
qDebug() << "axis limits" << i << a_min[i] << "->" << a_max[i];
}