X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Classes%2FNJDeviceController.m;h=5df317bda64a13d019d06180b4834c517783292c;hp=23a0932d497f21119a16ddf9e93965d9699f8fd9;hb=6a8c6539cc3f7a4b32a9f226da6ae06074e4f0cb;hpb=6a7c78afa7b8a34901f59a79afe41d18855734bc diff --git a/Classes/NJDeviceController.m b/Classes/NJDeviceController.m index 23a0932..5df317b 100644 --- a/Classes/NJDeviceController.m +++ b/Classes/NJDeviceController.m @@ -13,7 +13,6 @@ #import "NJInput.h" #import "NJOutput.h" #import "NJEvents.h" -#import "NJDeviceViewController.h" @implementation NJDeviceController { NJHIDManager *_hidManager; @@ -67,14 +66,6 @@ [_continuousOutputsTick invalidate]; } -- (NJDevice *)objectAtIndexedSubscript:(NSUInteger)idx { - return idx < _devices.count ? _devices[idx] : nil; -} - -- (NSUInteger)count { - return _devices.count; -} - - (void)addRunningOutput:(NJOutput *)output { // Axis events will trigger every small movement, don't keep // re-adding them or they trigger multiple times each time. @@ -198,8 +189,6 @@ - (void)setSimulatingEvents:(BOOL)simulatingEvents { if (simulatingEvents != _simulatingEvents) { _simulatingEvents = simulatingEvents; - NSInteger state = simulatingEvents ? NSOnState : NSOffState; - simulatingEventsButton.state = state; NSString *name = simulatingEvents ? NJEventSimulationStarted : NJEventSimulationStopped; @@ -218,20 +207,7 @@ [self stopHid]; } -- (IBAction)simulatingEventsChanged:(NSButton *)sender { - self.simulatingEvents = sender.state == NSOnState; -} - -- (NSInteger)numberOfDevicesInDeviceList:(NJDeviceViewController *)dvc { - return _devices.count; -} - -- (NJDevice *)deviceViewController:(NJDeviceViewController *)dvc - deviceForIndex:(NSUInteger)idx { - return _devices[idx]; -} - -- (NJInputPathElement *)objectForKeyedSubscript:(NSString *)uid { +- (NJInputPathElement *)elementForUID:(NSString *)uid { for (NJDevice *dev in _devices) { id item = [dev elementForUID:uid]; if (item)