Remove project headers from the prefix header; having everything in the prefix header...
[enjoyable.git] / TargetToggleMouseScope.m
index 55357e5..d6833fc 100644 (file)
@@ -8,6 +8,9 @@
 
 #import "TargetToggleMouseScope.h"
 
+#import "ApplicationController.h"
+#import "JoystickController.h"
+
 @implementation TargetToggleMouseScope
 
 -(NSString*) stringify {
        return target;
 }
 
--(void) trigger: (JoystickController *)jc {
+- (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]);
 }