karalabe / hid

Gopher Interface Devices (USB HID)
Other
263 stars 131 forks source link

Report ID on Windows 10 Mingw64 #7

Open DDRBoxman opened 7 years ago

DDRBoxman commented 7 years ago

I'm playing around with an elgato streamdeck on windows and I had to remove the report ID to get it to work. Not sure if an underlying library is acting differently or what.

https://github.com/karalabe/hid/blob/master/hid_enabled.go#L168

benma commented 6 years ago

@karalabe I also had to work around the library appending a report ID on windows only.

I understand that you do it for windows only as on unix, the signal11 library strips it off again (if the first byte is zero).

This is an issue if you send message that happens to start with a zero byte.

In my code, I had to make sure to add a report ID for unix, but not for windows.

I suggest that you add the report ID also for unix. Backwards compatibility would be an issue, though there are various ways to cope with this.

Thoughts?

benma commented 6 years ago

Ping @karalabe