Closed bsiever closed 2 years ago
PJRC/Teensy has some good details on how their HID descriptor maps to a joystick: https://www.pjrc.com/teensy/td_joystick.html
Virtual Gamepad emulation framework: https://vigem.org/
Unity's level of HID support: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/HID.html
I've tried several variations (joystick vs. Gampad variations). Joystick (based on Teensy) didn't seem to be recognized correctly on most platforms. Reverted and holding with this report for now. May want to reconsider having internal state.
May want to compare with Teensy Joystick (different usage page): https://github.com/PaulStoffregen/cores/blob/02b18c609abebb4b3565a9d4b8db43f3433c6f78/usb_hid/usb.c#L172
send_now()
: https://github.com/PaulStoffregen/cores/blob/02b18c609abebb4b3565a9d4b8db43f3433c6f78/usb_hid/usb_api.cpp#L629Init: https://github.com/PaulStoffregen/cores/blob/02b18c609abebb4b3565a9d4b8db43f3433c6f78/usb_hid/usb.c#L545
Report methods: https://github.com/PaulStoffregen/cores/blob/02b18c609abebb4b3565a9d4b8db43f3433c6f78/usb_hid/usb_api.h#L89