#import "Joystick.h"
+#import "JSAction.h"
+#import "JSActionAnalog.h"
+#import "JSActionButton.h"
+#import "JSActionHat.h"
+
static NSArray *ActionsForElement(IOHIDDeviceRef device, id base) {
CFArrayRef elements = IOHIDDeviceCopyMatchingElements(device, NULL, kIOHIDOptionsTypeNone);
NSMutableArray *children = [NSMutableArray arrayWithCapacity:CFArrayGetCount(elements)];
}
- (id)base {
- // FIXME(jfw): This is a hack because actions get joysticks as their base.
return nil;
}
-- (NSString *)stringify {
- return [[NSString alloc] initWithFormat: @"%d~%d~%d", vendorId, productId, index];
+- (NSString *)uid {
+ return [NSString stringWithFormat: @"%d:%d:%d", vendorId, productId, index];
}
- (JSAction *)findActionByCookie:(void *)cookie {