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.
This commit is contained in:
Léo Lam
2016-07-24 17:20:40 +02:00
parent 84467d2ff1
commit 843b030eda
16 changed files with 257 additions and 210 deletions

View File

@ -0,0 +1 @@
add_library(hidapi-libusb hid.c)

1
Externals/hidapi/linux/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1 @@
add_library(hidapi-hidraw hid.c)

1
Externals/hidapi/mac/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1 @@
add_library(hidapi hid.c)