Commit Graph

15 Commits

Author SHA1 Message Date
Admiral H. Curtiss
6ea7af13e8
cmake: Disable warnings for most externals on MSVC, like we do in the VS project files. 2022-05-22 00:30:56 +02:00
OatmealDome
b9ad174606 hidapi: Add new patches to applied patches folder 2021-08-09 21:34:02 -04:00
OatmealDome
25c85d827a hidapi: Don't leak device handle in macOS 10.10 or newer
Ported from libusb's hidapi fork. Original patch by Youw (cdc473dfe43f6432dda7ad53d7656b8ae8ff968b).
2021-08-09 21:24:10 -04:00
OatmealDome
b24599cf5b hidapi: Stop current run loop in removal callback instead of fetching from context 2021-08-09 21:15:17 -04:00
Léo Lam
6036680376
hidapi: Use LIBUSB_LIBRARIES to link to libusb
Because we have an old-style find script that does not define a proper
CMake target for libusb, we need to use ${LIBUSB_LIBRARIES}
rather than "usb".

Ideally, we would fix the find script to define a target. However,
this issue breaks the fifoci-ogl-lin-mesa builder and I'd prefer it
to be fixed sooner rather than later.
2021-02-11 21:58:15 +01:00
MerryMage
14c03388b3 Externals: Link against required libraries
* curl requires zlib
* hidapi when not using libudev requires libusb
2021-01-03 14:26:38 +00:00
Vincent Duvert
bb5e5d964a Added patches for hidapi modifications
This allows tracking what modifications were made to the upstream code.
2018-01-13 21:20:54 +01:00
Vincent Duvert
3abc288e02 macOS: Add errno setting in set_report (HID)
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.
2018-01-07 11:14:51 +01:00
Vincent Duvert
8d5810a103 macOS: Use unique IDs for HID paths
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.
2018-01-07 11:00:01 +01:00
Léo Lam
04e7e027e0 Remove unused solution files 2017-06-16 13:09:50 +02:00
Michael Maltese
537fbf33a7 Remove HIDAPI Autotools build system and unused files 2017-04-27 02:41:00 -07:00
Michael Maltese
655ab9b4e2 CMake: clean up HIDAPI build 2017-04-27 02:41:00 -07:00
Florent Castelli
08d6a24bbc cmake: Build HIDAPI on Windows 2017-01-21 00:34:02 +01:00
Léo Lam
843b030eda WiimoteReal: Add a hidapi IO implementation
Based on ca0c2efe7a. Credits go to flacs.
However, unlike the original commit, hidapi does not completely replace
the current implementations, so we can still connect Wiimotes with 1+2
(without pairing).

Also, it is only used on Linux and OS X for now. This removes the
advantage of having only one implementation but there is no other
choice: using hidapi on Windows is currently impossible because
hid_write() is implemented in a way that won't work with Wiimotes.

Additionally:
* We now check for the device name in addition to the PID/VID so we can
  support the Balance Board and maybe third-party Wiimotes too. This
  doesn't achieve anything with the DolphinBar but it does with hidraw.
* Added a check to not connect to the same device more than once.
2016-10-03 11:41:23 +02:00
Tillmann Karras
84467d2ff1 Externals: add hidapi
Current master (d17db57b9d4354752e0af42f5f33007a42ef2906) because
Android support was added after the current release (0.8.0-rc1).
2016-10-03 11:37:24 +02:00