IntergatedCircuits / HidSharp

HIDSharp is a multiplatform C# library for USB HID devices by James F. Bellinger
https://www.zer7.com/software/hidsharp
Other
121 stars 34 forks source link

Enable more lenient parsing of report descriptor on Windows. #19

Closed Joop-Schilder closed 1 year ago

Joop-Schilder commented 1 year ago

HidSharp has trouble parsing some report descriptors on Windows. This makes some devices unusable with HidSharp. By discarding report items which overlap or report items having undefined usage values (0) we enable more lenient parsing. This makes HidSharp usable with more devices.

This pull request fixes #18. We are still testing this.

benedekkupper commented 1 year ago

Please remove any unneeded whitespace changes from the commit.

Joop-Schilder commented 1 year ago

Please remove any unneeded whitespace changes from the commit.

Done! I usually leave an empty line below my if-statements for legibility. If you want to, I can remove those too. Do you happen to have a code style guide for HidSharp?

benedekkupper commented 1 year ago

I have done some minor changes and pushed your commit to master. There is no style guide, since I'm not the author, and I have no resources to manage this library properly. I did extend the single line branches so it's easier to debug if that branch is entered, and I can recommend that practice to you as well.