Closed spjwebster closed 8 years ago
Would it be enough for you to allow the setting of vendor id and product id directly from user space ?
@aldur can you eventually work on it (i am super-busy on a sprint this week)
@unbit Thanks for the quick response. vendor id, product id and product serial number would be ideal.
I'll dig into it :)
@spjwebster I've added support for Serial Number, Vendor ID and Product ID (c731f849139ad8bc38b916f3daefe6a7379247eb). Can you test it please? I've also updated the docs.
Speedy work @aldur. I haven't tested yet - need to disable kext signing and reboot - but I've added a comment on a potential issue in one of your commits in c731f849139ad8bc38b916f3daefe6a7379247eb.
Thanks for spotting it, I'll fix it as soon as I have a moment :)
OK, that should be fixed too (7567319328f05227522aa20fa402efd0140501ec). Let me know if you have other feedbacks.
@spjwebster the targeted features are now in the 0.2.1 release and the kext
is signed.
I'm closing this, but feel free to re-open it in case of related issues.
The IOHIDDevice class provides default implementations for newVendorIDNumber, newProductIDNumber, etc. that all return zero. Because foohid doesn't override these methods, games like Elite: Dangerous, which rely on these properties to rebind joystick/keyboard inputs to in-game controls, constantly lose their bindings.
I'm using foohid as a replacement for the now-defunct (and 10.10+ incompatible) WirtualJoy in my fork of HoverPad, which does override these methods and more: https://github.com/alxn1/wjoy/blob/master/WirtualJoy/wirtual_joy_device.cpp#L194
I'm currently waiting on Apple to upgrade my cert into one with kext signing, otherwise I'd happily work on this myself. If I manage to get the cert before you implement this I'll make an attempt at a pull request, but would appreciate any thoughts you would have on how to integrate this into the User Client API.