summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-18 21:28:04 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-18 21:28:04 +0200
commitcd8c47dc628016d470268bbed3c29461ffed296d (patch)
treeb26d9c26657f68fc50d58dc277f37a8f617f57ed /ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
parent15df1de681021950e46a9321c2606c2ea4b63afc (diff)
evdev: don't filter out non-joysticks
Diffstat (limited to 'ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp')
-rw-r--r--ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp b/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
index a36e821c..8bb35314 100644
--- a/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
+++ b/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.cpp
@@ -29,8 +29,7 @@ FTNoIR_Tracker::~FTNoIR_Tracker()
void FTNoIR_Tracker::StartTracker(QFrame*)
{
- QString pretty_name = s.device_name;
- QString node_name = "usb-" + pretty_name.replace(' ', '_') + "-event-joystick";
+ QString node_name = s.device_name;
std::string str = (QString("/dev/input/by-id/") + node_name).toStdString();
const char* filename = str.c_str();
@@ -63,8 +62,7 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data)
{
if (node)
{
- int max = 64;
- while (libevdev_has_event_pending(node) == 1 && max-- > 0)
+ while (libevdev_has_event_pending(node) == 1)
{
struct input_event ev;
int status = libevdev_next_event(node, LIBEVDEV_READ_FLAG_NORMAL, &ev);