-
Notifications
You must be signed in to change notification settings - Fork 901
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
mac: fix behaviour of hid_get_feature_report #219
base: master
Are you sure you want to change the base?
Conversation
…rt id byte) and return value was not right)
Hello Alan, I'm pretty happy to see that you're carefully checking patches submissions. I agree Apple docs are kinda horrible. I double checked my fix and tested it on OSX 10.10. Keep me posted, Raphaël |
What is the status of this PR? It's currently being applied in the Homebrew formula, but it's not clear that upstream agrees with the change, in which case we would probably want to remove it from the formula. |
+1 on this. For psmoveapi and PSMoveService this is a problem. The number of bytes returned by hid_get_feature_report is different on Windows than it is on Mac. According to your API doc strings, the Windows version is returning the correct number of bytes but the Mac version returns one less. However, it's not entirely so straightforward. The PSMove can be connected via bluetooth or USB. All of the BT feature reports behave as described above. At least one of the USB feature reports does not, where the first byte no longer contains the report id. I'll have to investigate this further. |
@signal11 ping on this PR |
Also confirming that on the current master branch does not match the documentation on macOS 10.12. The first byte returned is not the report id, even when the report id is requested and the length is off by one. |
This behaviour in The work-around I have is to explicitly set a non-zero report ID (by setting the 0th byte in the buffer to something other than 0). In this case the Linux and OSX APIs will return the same result, but it does mean that the commands sent to the device change. There don't appear to be any negative side-effects for the device I'm working with, but this may be problematic for others. Update (2019-08-11):
|
@rbarazzutti do you happen to remember, have you been using numbered reports or not? as far as I can tell from the original message of @micolous (9 Nov 2018) - Report ID is his case was zero (no numbered reports) |
This fix is quite important for the Mac platform, since the behaviour of hid_get_feature_report was not following the specs.