Still need to prevent duplicates for axes.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 11 Mar 2013 12:23:27 +0000 (13:23 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 11 Mar 2013 12:23:27 +0000 (13:23 +0100)
Classes/NJDeviceController.m

index 3f0c6c8cce86f7c9468c9baa45c34a5c050892f2..cb7b9175a9d9a9a2f40bc521f350ca773a71b230 100644 (file)
 }
 
 - (void)addRunningOutput:(NJOutput *)output {
-    [_continousOutputs addObject:output];
+    // Axis events will trigger every small movement, don't keep
+    // re-adding them or they trigger multiple times each time.
+    if (![_continousOutputs containsObject:output])
+        [_continousOutputs addObject:output];
     if (!_continuousOutputsTick) {
         _continuousOutputsTick = [NSTimer scheduledTimerWithTimeInterval:1.0/60.0
                                                            target:self