2020-06-02 21:24:40 +00:00
|
|
|
#pragma once
|
|
|
|
#include "wiicontroller.hpp"
|
2020-06-09 20:39:30 +00:00
|
|
|
#include "switchcontroller.hpp"
|
2020-06-02 21:24:40 +00:00
|
|
|
|
|
|
|
namespace controller {
|
|
|
|
|
2020-06-09 20:39:30 +00:00
|
|
|
union WiimoteReportData {
|
|
|
|
struct {
|
|
|
|
WiiButtonData buttons;
|
|
|
|
uint8_t _unk;
|
|
|
|
} report0x30;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-06-02 21:24:40 +00:00
|
|
|
class WiimoteController : public WiiController {
|
|
|
|
|
|
|
|
public:
|
|
|
|
static constexpr const HardwareID hardwareIds[] = {
|
|
|
|
{0x057e, 0x0306}, // Official wiimote
|
|
|
|
};
|
|
|
|
|
2020-06-10 21:07:18 +00:00
|
|
|
WiimoteController(const BluetoothAddress *address);
|
2020-06-02 21:24:40 +00:00
|
|
|
|
2020-06-09 20:39:30 +00:00
|
|
|
void convertReportFormat(const HidReport *inReport, HidReport *outReport);
|
|
|
|
|
2020-06-02 21:24:40 +00:00
|
|
|
private:
|
2020-06-09 20:39:30 +00:00
|
|
|
void handleInputReport0x30(const WiimoteReportData *src, SwitchReportData *dst);
|
2020-06-02 21:24:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|