~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to intern/ghost/intern/GHOST_NDOFManagerX11.cpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-05-12 20:02:22 UTC
  • mfrom: (14.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20120512200222-lznjs2cxzaq96wua
Tags: 2.63a-1
* New upstream bugfix release
  + debian/patches/: re-worked since source code changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        setDeadZone(0.1f); /* how to calibrate on Linux? throw away slight motion! */
38
38
 
39
39
        if (spnav_open() != -1) {
 
40
                m_available = true;
 
41
 
40
42
                /* determine exactly which device (if any) is plugged in */
41
43
 
42
44
#define MAX_LINE_LENGTH 100
49
51
                                unsigned short vendor_id = 0, product_id = 0;
50
52
                                if (sscanf(line, "Bus %*d Device %*d: ID %hx:%hx", &vendor_id, &product_id) == 2)
51
53
                                        if (setDevice(vendor_id, product_id)) {
52
 
                                                m_available = true;
53
54
                                                break; /* stop looking once the first 3D mouse is found */
54
55
                                        }
55
56
                        }