Add ability to passthrough a Bluetooth adapter

This adds the ability to passthrough a whole Bluetooth adapter and skip
the majority of the Bluetooth emulation code. We use libusb to send HCI
commands, receive HCI events and transfer ACL data directly to the
first adapter that is found or to a specific adapter (if configured to)

This is possible because the Wii's Bluetooth module is actually just
a pretty standard Bluetooth adapter…

…except for two vendor-specific commands, for which replies are faked,
and also for the sync button. This adds a hotkey that works in the
exact same way as the sync button would on a Wii: it triggers an HCI
event, which emulated software interpret as a command to perform
a BT inquiry.

This commit also changes the UI code to expose passthrough mode
and WII_IPC_HLE to be a bit more thread safe (for the device map).
This commit is contained in:
Léo Lam 2016-08-23 16:19:30 +02:00
parent 59a17db6c4
commit 4b47997cf8
31 changed files with 1055 additions and 272 deletions

View file

@ -71,7 +71,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system
static const u32 STATE_VERSION = 61; // Last changed in PR 4216
static const u32 STATE_VERSION = 62; // Last changed in PR 4195
// Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list,