-
Notifications
You must be signed in to change notification settings - Fork 398
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
hidapi/windows: fixed PS4 controllers over Bluetooth on Windows 7 #578
base: master
Are you sure you want to change the base?
hidapi/windows: fixed PS4 controllers over Bluetooth on Windows 7 #578
Conversation
a0b7394
to
4f7de87
Compare
static int hid_write_output_report(hid_device *dev, const unsigned char *data, size_t length) | ||
{ | ||
BOOL res; | ||
res = HidD_SetOutputReport(dev->device_handle, (void *)data, (ULONG)length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see #224
I'm confident we need to do the same thing for HidD_SetOutputReport
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slouken any thoughs/comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slouken It seems, you missed to respond to this question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like #224 was just pre-allocating the buffer. Were you referring to another change that made sure the buffer size matched feature_report_length? I think, but I'm not sure, that the feature_report_length is the wrong size in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that the buffer size has to be at least output_report_length
bytes in size.
If user passes less data - logically it is not a proble, but WinAPI implementation is known to crash if bufer is too small.
The workaround (as in #224) is to pre-allocate buffer that is large-enough if needed.
Sorry to ping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good
4f7de87
to
4cd8137
Compare
Okay, I've updated the PR with your suggestions. |
Signed-off-by: Sam Lantinga <[email protected]>
4cd8137
to
bf1d2ae
Compare
…over-Bluetooth-.patch
Now that Windows 7 has been out of support for a while, I am not so sure if we still care about Windows 7 or not, if this issue is only specific to Windows 7. https://learn.microsoft.com/en-us/lifecycle/products/windows-7
|
On the other hand, #513 does not seem to be related to Windows 7. |
No description provided.