We already use a custom CMakeLists file for xxhash, so we can just make it's headers
public as part of its target interface.
This way, only libraries that link in the xxhash target will see its headers, as opposed
to every target under the top-level directory.
IsDeviceUsable in IOhidapi.cpp uses errno to detect if hid_write failed because of an unconnected Wiimote on a Dolphinbar (it expects errno == EPIPE in this case).
macOS’s implementation of hid_write detected this specific error (IOHIDDeviceSetReport returns kUSBHostReturnPipeStalled) but didn’t set errno so the check failed.
This add errno assignment to failure cases of macOS’s hid_write.
If available, use the system-generated unique ID for HID device paths instead of a transport/vid/pid/location tuple.
The Mayflash Dolphinbar registers four HID devices (regardless of the number of connected Wiimotes) which had the same path with the previous path building method, causing a bit of confusion when detecting and connecting to Wiimotes.
The unique IDs do not change if the computer is suspended and resumed, but do change if the HID device is unplugged/replugged.
A bunch of changes, looks mainly like bug fixes and code cleanup.
Notable changes:
- `cubeb_get_min_latency`'s signature was changed to take params via
pointer, requiring Dolphin code to be tweaked in two places.
- A fix for kinetiknz/cubeb#320, as reported by @shuffle2
- Fixed build on FreeBSD (kinetiknz/cubeb#344), as contributed by @endrift
* -Wno-unused-but-set-variable: only set this flag with gcc, otherwise
clang will issue warnings about the warning option being unknown :)
(-Wunknown-warning-option)
* -Wmissing-variable-declarations: clang warns about missing extern
declarations for non-static variables.
The latest version has tons of security fixes (which is expected for a
library such as mbedtls).
Updating also allows getting rid of a few deprecation warnings.
Check UsbDK availability at run time and activate UsbDk backend when
possible.
Fall back to current behavior when UsbDK not installed.
Signed-off-by: Dmitry Fleytman <dfleytma@...>
Signed-off-by: Sameeh Jubran <sameeh@...>
The usbdk backend is the only libusb backend that has official support
for isochronous transfers (which are required for Wii Speak,
microphones and cameras). And it's actively developed and maintained.
Compilers are very picky and don't use PCH when they have been compiled
with different flags. I even got some ICE in MSVC, so removing them for now.
Modules are the solution.
- The `PA_USE_{ASIO,WMME,...}` macros are no longer used, instead do
feature selection by compiling only the backends wanted.
- The `PA_WDMKS_NO_KSGUID_LIB` macro has been obviated along with the
link to ksguid.lib.
When on Linux and using libusb from Externals, and with libudev
available, an "undefined reference" error message appears at link time.
This is due to a wrong define being set in CMake for libusb with
libudev. This causes the code for netlink being used instead of the
correct code for libudev support.
Fix the issue by setting the correct define so the correct libusb code
is used.
1.0.21 adds a usbdk backend, which may be helpful as it could be
used in the future to work around the missing isochronous transfer
support for WinUSB backends.
Here is the full changelog (from libusb).
2016-10-01: v1.0.21:
* Core: Refactor code related to transfer flags and timeout handling
* Darwin: Ignore root hub simulation devices
* Darwin: Improved support for OS X El Capitan
* Darwin: Work around devices with buggy endpoint descriptors
* Darwin: Do not use objc_registerThreadWithCollector after its deprecation
* Darwin: Use C11 atomics on 10.12+ as the OS atomics are now deprecated
* Linux: Support preallocating kernel memory for zerocopy USB
* Linux: Deal with receiving POLLERR before all transfers have completed
* Solaris: Add solaris backend
* Windows: Add Visual Studio 2015 support
* Windows: Add usbdk backend
* Prevent attempts to recursively handle events
* Fix race condition in handle_timeout()
* Allow transferred argument to be optional in bulk APIs
* Various other bug fixes and improvements