layout shortcut fix, preview popup w, no shuttle ev_grab, ffmpeg af_aformat leak...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / shuttle.C
index 22adeaf01180c29609e9d3280870313bc84ad403..4c780f1a6021105972acd6a627bbc060b4ee7c77 100644 (file)
@@ -619,6 +619,8 @@ static const struct shuttle_dev {
                0x0b33, 0x0030 },
        { "/dev/input/by-id/usb-Contour_Design_ShuttlePro-event-if00",
                0x0b33, 0x0030 },
+       { "/dev/input/by-id/usb-Contour_Design_ShuttlePRO_v2-event-joystick",
+               0x0b33, 0x0030 },
 };
 
 #ifdef HAVE_SHUTTLE_USB
@@ -847,7 +849,7 @@ void Shuttle::run()
        while( devsh && !done ) {
                int len = 0;
                static const int IN_ENDPOINT = 0x81;
-               unsigned char dat[BCSTRLEN];
+               unsigned char dat[5];
                int ret = libusb_interrupt_transfer(devsh,
                                IN_ENDPOINT, dat, sizeof(dat), &len, 100);
                if( ret != 0 ) {
@@ -891,7 +893,7 @@ void Shuttle::run()
                        if( first_time ) break;
                        continue;
                }
-               if( !ioctl(fd, EVIOCGRAB, 1) ) { // exclusive access
+               if( 1 || !ioctl(fd, EVIOCGRAB, 1) ) { // exclusive access
                        first_time = 0;
                        while( !done ) {
                                int ret = read(fd, &ev, sizeof(ev));