implement hid_get_input_report for Linux hidraw backend #351
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!351
Loading…
Reference in a new issue
No description provided.
Delete branch "hidraw_get_input_report"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes https://github.com/libusb/hidapi/issues/259
I don't know if this actually works with Linux < 5.11, but at least it should build.
Looking closer at the commit that implemented this in Linux, simply defining the macro won't do anything in Linux < 5.11 without the other changes in that commit. So I changed this to keep the old dummy code that just returns an error for old versions of Linux.
The ifdef checks the Kernel at compile time and returns the error if it was compiled on a too old Kernel.
But what happens if the executable is compiled on a new kernel, but executed on an old one?
I have not tested that.
I suppose that could actually happen with Flatpak... I'll test what happens with a VM running an old kernel.
Lets have the functionality compile regardless of the kernel version (e.g. if not defined HIDIOCGINPUT - define it);
As fo running on the older kernel - I'm pretty sure the call will simply fail, since the correspondind ioctl isn't supported.
Okay I switched it back to the original implementation copying the definition from hidraw.h.
This looks good.
I'd like to check it locally with my device(s) befor having it merged.
move it to line 64 of this file
Have you had a chance to test this yet?
I finally had.
Everything looks perfect. Thanks!
Thanks. Do you have a plan when you will make the next release?
The major (minor actually) release is not going to happen soon - nothing really done for that.
But I'll try to make a patch release soon.
A patch release soon with this fix would be good.
Any further updates about a patch release?
@Be-ing I know you've waited for 0.11.1 the most of all, but be aware, that I've removed 0.11.1 release due to non-updated version file in that release (see #366).
0.11.2 is as good for you.
Thanks! I made a PR to update vcpkg.
I also made a PR to update the Rust bindings.