MissionControl/mc_mitm/source/controllers/icade_controller.hpp
2023-02-23 21:57:56 +01:00

47 lines
1.4 KiB
C++

/*
* Copyright (c) 2020-2023 ndeadly
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "emulated_switch_controller.hpp"
namespace ams::controller {
struct ICadeInputReport0x01 {
u8 keys[9];
} PACKED;
struct ICadeReportData {
u8 id;
union {
ICadeInputReport0x01 input0x01;
};
} PACKED;
class ICadeController final : public EmulatedSwitchController {
public:
static constexpr const HardwareID hardware_ids[] = {
{0x15e4, 0x0132} // ION iCade Controller
};
ICadeController(const bluetooth::Address *address, HardwareID id)
: EmulatedSwitchController(address, id) { }
void ProcessInputData(const bluetooth::HidReport *report) override;
void ApplyButtonCombos(SwitchButtonData *buttons) override;
};
}