X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=TargetToggleMouseScope.m;h=499e9c9a3e768d51441deb99fa93d576fe2aadea;hp=968237cfa1bf2d1ef7c1ab1a5c221dccc783c42d;hb=f864d363128de19fc6591b77ae9226b34166d715;hpb=51336622a1df8de5dd8aaec0972b9b04292fd88d diff --git a/TargetToggleMouseScope.m b/TargetToggleMouseScope.m index 968237c..499e9c9 100644 --- a/TargetToggleMouseScope.m +++ b/TargetToggleMouseScope.m @@ -8,7 +8,7 @@ #import "TargetToggleMouseScope.h" #import "ApplicationController.h" -#import "JoystickController.h" +#import "NJInputController.h" @implementation TargetToggleMouseScope @@ -28,10 +28,9 @@ - (void)trigger { // FIXME: It's hacky to get at the controller this way, but it's // also hacky to pass it. Shouldn't need to do either. - ApplicationController *ac = [NSApplication sharedApplication].delegate; - JoystickController *jc = ac.jsController; - [jc setFrontWindowOnly: ![jc frontWindowOnly]]; - printf("Front window only: %d\n", [jc frontWindowOnly]); + ApplicationController *ac = NSApplication.sharedApplication.delegate; + NJInputController *jc = ac.jsController; + jc.frontWindowOnly = !jc.frontWindowOnly; } @end