mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-26 14:20:21 +00:00
47 lines
1.4 KiB
C++
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;
|
|
|
|
};
|
|
|
|
}
|