HidLibrary
HidLibrary copied to clipboard
UsagePage and Usage should be ushort
Would be nice if HidDevice.Capabilities.UsagePage
and HidDevice.Capabilities.Usage
would be declared as ushort instead of short. Currently an ugly cast is required to check for large values:
var device= HidDevices.Enumerate(VID,PID)
.Where(d => d.Capabilities.UsagePage == unchecked((short)0xFFC9) && d.Capabilities.Usage == unchecked((short)0xF123)
.FirstOrDefault();
I believe that you're right, so it would be worth making a PR.