diff options
| author | 2023-05-09 00:30:25 -0600 | |
|---|---|---|
| committer | 2023-05-09 00:32:53 -0600 | |
| commit | cb1487d77468c7dd7ca49779d9f9010ed925e3fc (patch) | |
| tree | a69db23a78becd18acc75630da1929b086c44181 /src/input_common/helpers/joycon_protocol/common_protocol.cpp | |
| parent | Merge pull request #10205 from jbeich/freebsd (diff) | |
| download | yuzu-cb1487d77468c7dd7ca49779d9f9010ed925e3fc.tar.gz yuzu-cb1487d77468c7dd7ca49779d9f9010ed925e3fc.tar.xz yuzu-cb1487d77468c7dd7ca49779d9f9010ed925e3fc.zip | |
input_common: Fix nfc detection for joycons
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/common_protocol.cpp')
| -rw-r--r-- | src/input_common/helpers/joycon_protocol/common_protocol.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input_common/helpers/joycon_protocol/common_protocol.cpp b/src/input_common/helpers/joycon_protocol/common_protocol.cpp index 2b42a4555..077d72cd0 100644 --- a/src/input_common/helpers/joycon_protocol/common_protocol.cpp +++ b/src/input_common/helpers/joycon_protocol/common_protocol.cpp | |||
| @@ -236,13 +236,13 @@ DriverResult JoyconCommonProtocol::GetMCUDataResponse(ReportMode report_mode, | |||
| 236 | return DriverResult::Success; | 236 | return DriverResult::Success; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | DriverResult JoyconCommonProtocol::SendMCUData(ReportMode report_mode, SubCommand sc, | 239 | DriverResult JoyconCommonProtocol::SendMCUData(ReportMode report_mode, MCUSubCommand sc, |
| 240 | std::span<const u8> buffer, | 240 | std::span<const u8> buffer, |
| 241 | MCUCommandResponse& output) { | 241 | MCUCommandResponse& output) { |
| 242 | SubCommandPacket packet{ | 242 | SubCommandPacket packet{ |
| 243 | .output_report = OutputReport::MCU_DATA, | 243 | .output_report = OutputReport::MCU_DATA, |
| 244 | .packet_counter = GetCounter(), | 244 | .packet_counter = GetCounter(), |
| 245 | .sub_command = sc, | 245 | .mcu_sub_command = sc, |
| 246 | .command_data = {}, | 246 | .command_data = {}, |
| 247 | }; | 247 | }; |
| 248 | 248 | ||
| @@ -269,8 +269,7 @@ DriverResult JoyconCommonProtocol::WaitSetMCUMode(ReportMode report_mode, MCUMod | |||
| 269 | std::size_t tries{}; | 269 | std::size_t tries{}; |
| 270 | 270 | ||
| 271 | do { | 271 | do { |
| 272 | const std::vector<u8> mcu_data{static_cast<u8>(MCUMode::Standby)}; | 272 | const auto result = SendMCUData(report_mode, MCUSubCommand::SetDeviceMode, {}, output); |
| 273 | const auto result = SendMCUData(report_mode, SubCommand::STATE, mcu_data, output); | ||
| 274 | 273 | ||
| 275 | if (result != DriverResult::Success) { | 274 | if (result != DriverResult::Success) { |
| 276 | return result; | 275 | return result; |