mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 23:55:45 +00:00
input_common: Implement joycon ir camera
This commit is contained in:
parent
5cb437703f
commit
459fb2b213
15 changed files with 608 additions and 23 deletions
|
@ -120,6 +120,19 @@ DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, std::span<const
|
|||
return DriverResult::Success;
|
||||
}
|
||||
|
||||
DriverResult JoyconCommonProtocol::SendMcuCommand(SubCommand sc, std::span<const u8> buffer) {
|
||||
std::vector<u8> local_buffer(MaxResponseSize);
|
||||
|
||||
local_buffer[0] = static_cast<u8>(OutputReport::MCU_DATA);
|
||||
local_buffer[1] = GetCounter();
|
||||
local_buffer[10] = static_cast<u8>(sc);
|
||||
for (std::size_t i = 0; i < buffer.size(); ++i) {
|
||||
local_buffer[11 + i] = buffer[i];
|
||||
}
|
||||
|
||||
return SendData(local_buffer);
|
||||
}
|
||||
|
||||
DriverResult JoyconCommonProtocol::SendVibrationReport(std::span<const u8> buffer) {
|
||||
std::vector<u8> local_buffer(MaxResponseSize);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue