mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-02 21:11:17 +12:00
Linux: Allow connecting Wiimotes via L2CAP (#1353)
This commit is contained in:
parent
934cb54605
commit
dd0af0a56f
14 changed files with 532 additions and 221 deletions
22
src/input/api/Wiimote/l2cap/L2CapWiimote.h
Normal file
22
src/input/api/Wiimote/l2cap/L2CapWiimote.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
#include <input/api/Wiimote/WiimoteDevice.h>
|
||||
#include <bluetooth/bluetooth.h>
|
||||
|
||||
class L2CapWiimote : public WiimoteDevice
|
||||
{
|
||||
public:
|
||||
L2CapWiimote(int recvFd, int sendFd, bdaddr_t addr);
|
||||
~L2CapWiimote() override;
|
||||
|
||||
bool write_data(const std::vector<uint8>& data) override;
|
||||
std::optional<std::vector<uint8>> read_data() override;
|
||||
bool operator==(const WiimoteDevice& o) const override;
|
||||
|
||||
static void AddCandidateAddress(bdaddr_t addr);
|
||||
static std::vector<WiimoteDevicePtr> get_devices();
|
||||
private:
|
||||
int m_recvFd;
|
||||
int m_sendFd;
|
||||
bdaddr_t m_addr;
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue