I've updated my little test app to add a modified version of Jeff's HID code. I'm also integrating it into my main project in a more production-worthy fashion. For those interested:
https://github.com/zenmumbler/catest/blob/master/catest/main.mm
I apply the MS-suggested deadzone to the value and normalise the values. All the code in here is mostly for quick testing, but it does work. Use the left stick up/down to change the frequency of the tone.
Jeff, I was wondering, why is there a check for the report size of an element? I'll actually look up what a report is for an element, but why is it bad if it's bigger than 64 bytes?
My goal is essentially to rebuild what Feral has built up, a database of controller mappings to common controls. I.e. knowing that, for the X360 controller, elements with usage 48 and 49 correspond to the left stick, is very useful. I've always hated the horrible ultra-generic control mapping dialogs for HID controllers. Button #3, Axis Rx, it means nothing.
@wan, what driver are you using for your wired PS4 controller?