-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fix hidapi on Windows 10 #214
Comments
I forked a more recent hidapi and made some changes to it such that it now works in multiple Windows versions and OS X. I also made a change to the number of bytes hidapi returns in Windows to reverse a problematic commit made about 8 months after the hidapi commit pointed to currently by thp/psmoveapi/external/hidapi. Obviously this commit was made for a reason, but it causes the number of bytes returned to be different in Windows and OSX. I don't know if this is specific to Win10 only. |
@cboulay Did you try to submit your changes to https://github.com/signal11/hidapi via pull request? |
No. The most important change was done by someone else, committed on March 3. The problem with hid_get_feature_report returning different numbers of bytes in Mac and Windows still exists in their repo. According to their API docs, they want it to behave the Windows way where res = number of bytes in the feature report + 1. This is not what happens in Mac. I suppose I should make an issue about this. Until this is fixed, I think the best course of action would be to have the submodule point to the signal11/hidapi repo, but then change all the |
There's already a pull request for it. signal11/hidapi#219 |
Will this issue be adressed in the 4.0.0?? |
It's probably not yet fixed in 4.0.0, but hopefully a point release after that (now that we have proper CI and build/release infrastructure in place, it should be easy to do more regular releases, since the cost of doing a release is basically just doing a Git tag). @cboulay If I understand you correctly, if we replace the result checks with something like this, it should work, right? (the +1 only happens on Windows?)
|
I know hidapi in MacOS returns one less byte than hidapi in Windows. According to the hidapi API docs, returning (report-size + 1) bytes is expected, so it almost makes more sense to have This is a problem that should be addressed in hidapi itself, and I hope it will be soon, but your solution above should work until then. I haven't tested in Linux. |
I recompiled the project using @cboulay hidapi, it seemed to work fine, at least now the binaries recognize the controller. But I'm having a real hard time to pair it to bluetooth. Don't actually know if it is another problem regarding W10. |
hidapi: Use Windows 10 fixes by cboulay (Fixes #214)
hidapi needs to be adapted for Windows 10. See #187 (comment). Will the suggested dowgrade work on other platforms (including older versions of Windows) as well or are we losing something else in the process? Should Windows 10 simply user a different version of hidapi while everybody else sticks to the current one?
The text was updated successfully, but these errors were encountered: