diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-02-08 23:01:18 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2015-02-08 23:01:18 +0300 |
commit | a19229b80c18d74e24f418efdf526673b7cadb82 (patch) | |
tree | 8655ae5cbb01a8e9148ab20172dceb9c463adb0d /intern | |
parent | f0f3554e17398017a824582c401087b7dd3b2708 (diff) |
ndof: detect new 3Dx devices on Linux
Was filtering for Logitech's USB vendor ID. 3Dconnexion now uses their
own vendor ID for new products. Mac & Windows don't look for specific
vendors so they should be fine.
Also added a note to eventually make USE_FINISH_GLITCH_WORKAROUND
available on all platforms.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_NDOFManagerX11.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp index 8e6f9994e51..c72485e9e1b 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp +++ b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp @@ -42,8 +42,8 @@ GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys) #define MAX_LINE_LENGTH 100 - /* look for USB devices with Logitech's vendor ID */ - FILE *command_output = popen("lsusb -d 046d:", "r"); + /* look for USB devices with Logitech or 3Dconnexion's vendor ID */ + FILE *command_output = popen("lsusb | grep '046d:\|256f:'", "r"); if (command_output) { char line[MAX_LINE_LENGTH] = {0}; while (fgets(line, MAX_LINE_LENGTH, command_output)) { @@ -81,11 +81,11 @@ bool GHOST_NDOFManagerX11::available() * this causes any proceeding event to have a very high 'dt' (time delta), * many seconds for eg, causing the view to jump. * - * this workaround expect's continuous events, if we miss a motion event, + * this workaround expects continuous events, if we miss a motion event, * immediately send a dummy event with no motion to ensure the finished state is reached. */ #define USE_FINISH_GLITCH_WORKAROUND - +/* TODO: make this available on all platforms */ #ifdef USE_FINISH_GLITCH_WORKAROUND static bool motion_test_prev = false; |