X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Classes%2FNJOutputController.m;h=1567fee7507534ddced90980e439a0afba122ebf;hp=5235837ff107e94544aff561ad1f8e86646c5e65;hb=6a7c78afa7b8a34901f59a79afe41d18855734bc;hpb=e7c0b2d96e9e3209b5ba80cc1fdc8e7213cb5302 diff --git a/Classes/NJOutputController.m b/Classes/NJOutputController.m index 5235837..1567fee 100644 --- a/Classes/NJOutputController.m +++ b/Classes/NJOutputController.m @@ -20,7 +20,9 @@ #import "NJOutputMouseMove.h" #import "NJOutputMouseScroll.h" -@implementation NJOutputController +@implementation NJOutputController { + NJInput *_input; +} - (id)init { if ((self = [super init])) { @@ -157,7 +159,7 @@ } - (NJOutput *)currentOutput { - return mappingsController.currentMapping[inputController.selectedInput]; + return mappingsController.currentMapping[_input]; } - (NJOutput *)makeOutput { @@ -203,7 +205,7 @@ - (void)commit { [self cleanUpInterface]; - mappingsController.currentMapping[inputController.selectedInput] = [self makeOutput]; + mappingsController.currentMapping[_input] = [self makeOutput]; [mappingsController save]; } @@ -272,8 +274,9 @@ [self cleanUpInterface]; } -- (void)loadCurrent { - [self loadOutput:self.currentOutput forInput:inputController.selectedInput]; +- (void)loadInput:(NJInput *)input { + _input = input; + [self loadOutput:self.currentOutput forInput:input]; } - (void)focusKey { @@ -299,7 +302,7 @@ } - (void)mappingDidChange:(NSNotification *)note { - [self loadCurrent]; + [self loadInput:_input]; } @end