Cemu/src/input/api/Wiimote/hidapi/HidapiWiimote.h
capitalistspz dd0af0a56f
Some checks failed
Build check / build (push) Has been cancelled
Generate translation template / generate-pot (push) Has been cancelled
Linux: Allow connecting Wiimotes via L2CAP (#1353)
2024-12-07 12:02:40 +01:00

22 lines
527 B
C++

#pragma once
#include <api/Wiimote/WiimoteDevice.h>
#include <hidapi.h>
class HidapiWiimote : public WiimoteDevice {
public:
HidapiWiimote(hid_device* dev, std::string_view path);
~HidapiWiimote() 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 std::vector<WiimoteDevicePtr> get_devices();
private:
hid_device* m_handle;
const std::string m_path;
};