Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsagePage and Usage should be ushort #128

Open
luni64 opened this issue Apr 23, 2021 · 1 comment
Open

UsagePage and Usage should be ushort #128

luni64 opened this issue Apr 23, 2021 · 1 comment

Comments

@luni64
Copy link

luni64 commented Apr 23, 2021

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();    
@mjmatthiesen
Copy link
Contributor

I believe that you're right, so it would be worth making a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants