Material

Enjoyable 1.2, OS X 10.10 and IOHIDQueueGetDevice

Enjoyable 1.2 is out. This fixes input handling under OS X 10.10 ("Yosemite"); previous versions of Enjoyable never report any events.

In OS X 10.9 and earlier, you could get the device from the queue sender in the callback:

/* Registered with IOHIDDeviceRegisterInputValueCallback */
static void input(void *ctx, IOReturn inResult, void *inSender, IOHIDValueRef value) {
    IOHIDDeviceRef device = IOHIDQueueGetDevice(inSender);
    /* Do something with the device and value... */
}

This no longer works; IOHIDQueueGetDevice returns NULL. Instead, you need to pull the device from the value, via its element:

static void input(void *ctx, IOReturn inResult, void *inSender, IOHIDValueRef value) {
    IOHIDElementRef elt = value ? IOHIDValueGetElement(value) : NULL;
    IOHIDDeviceRef device = elt ? IOHIDElementGetDevice(elt) : NULL;
    /* Do something with the device and value... */
}

(I don't know if the NULL checks are needed, but since both getters have warnings about undefined behavior when passed invalid values/elements, it can't hurt.)

I also disabled Sparkle-based updating because Apple fucked up their code signing format. Yes, again. That's enough times that there's no legitimate claim to security left in it and it only continues to exist as a commercial bludgeon.