X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=JoystickController.m;h=0675075f158545ed1fba58d7e7cd7b2e95cc964e;hp=d87dca7d8fdb0fead42e07ae70aa0023eeb2e028;hb=08c920c47d68423c16a6deba2a59488772066f6b;hpb=25dd74a4a34f4ba7ec797360bd8f92cbd7bc758e diff --git a/JoystickController.m b/JoystickController.m index d87dca7..0675075 100644 --- a/JoystickController.m +++ b/JoystickController.m @@ -7,9 +7,16 @@ #import "JoystickController.h" +#import "ApplicationController.h" +#import "Config.h" +#import "ConfigsController.h" +#import "Joystick.h" +#import "JSAction.h" +#import "Target.h" +#import "TargetController.h" + @implementation JoystickController { IOHIDManagerRef hidManager; - BOOL programmaticallySelecting; NSTimer *continuousTimer; } @@ -76,8 +83,8 @@ static void input_callback(void *ctx, IOReturn inResult, void *inSender, IOHIDVa return; [controller expandRecursive:handler]; - controller->programmaticallySelecting = YES; [controller->outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[controller->outlineView rowForItem:handler]] byExtendingSelection: NO]; + [controller->targetController focusKey]; } } @@ -184,9 +191,6 @@ static void remove_callback(void *ctx, IOReturn inResult, void *inSender, IOHIDD - (void)outlineViewSelectionDidChange: (NSNotification*) notification { [targetController reset]; [targetController load]; - if (programmaticallySelecting) - [targetController focusKey]; - programmaticallySelecting = NO; } @end