From: Joe Wreschnig Date: Mon, 11 Mar 2013 12:23:27 +0000 (+0100) Subject: Still need to prevent duplicates for axes. X-Git-Tag: version-1.1~55 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=f2beb56b9f598beb5bcb66ccf53ddac4c794a1e8;p=enjoyable.git Still need to prevent duplicates for axes. --- diff --git a/Classes/NJDeviceController.m b/Classes/NJDeviceController.m index 3f0c6c8..cb7b917 100644 --- a/Classes/NJDeviceController.m +++ b/Classes/NJDeviceController.m @@ -49,7 +49,10 @@ } - (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