From f2beb56b9f598beb5bcb66ccf53ddac4c794a1e8 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Mon, 11 Mar 2013 13:23:27 +0100 Subject: [PATCH] Still need to prevent duplicates for axes. --- Classes/NJDeviceController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.30.2