diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-06-26 20:31:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 20:31:23 +0200 |
commit | b82c649b0fab7779d21c7381a8bad514ee698c04 (patch) | |
tree | a39301bfa6a211fc143ad73efc7e68d411bc6077 /src/input_common/helpers/joycon_protocol | |
parent | Merge pull request #10901 from german77/sdl_fix (diff) | |
parent | core: hid: Allow to read bin files while switch controller is available (diff) | |
download | yuzu-b82c649b0fab7779d21c7381a8bad514ee698c04.tar yuzu-b82c649b0fab7779d21c7381a8bad514ee698c04.tar.gz yuzu-b82c649b0fab7779d21c7381a8bad514ee698c04.tar.bz2 yuzu-b82c649b0fab7779d21c7381a8bad514ee698c04.tar.lz yuzu-b82c649b0fab7779d21c7381a8bad514ee698c04.tar.xz yuzu-b82c649b0fab7779d21c7381a8bad514ee698c04.tar.zst yuzu-b82c649b0fab7779d21c7381a8bad514ee698c04.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/helpers/joycon_protocol/common_protocol.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/input_common/helpers/joycon_protocol/common_protocol.cpp b/src/input_common/helpers/joycon_protocol/common_protocol.cpp index 51669261a..88f4cec1c 100644 --- a/src/input_common/helpers/joycon_protocol/common_protocol.cpp +++ b/src/input_common/helpers/joycon_protocol/common_protocol.cpp @@ -73,7 +73,7 @@ DriverResult JoyconCommonProtocol::SendRawData(std::span<const u8> buffer) { DriverResult JoyconCommonProtocol::GetSubCommandResponse(SubCommand sc, SubCommandResponse& output) { constexpr int timeout_mili = 66; - constexpr int MaxTries = 15; + constexpr int MaxTries = 3; int tries = 0; do { @@ -113,9 +113,7 @@ DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, std::span<const return result; } - result = GetSubCommandResponse(sc, output); - - return DriverResult::Success; + return GetSubCommandResponse(sc, output); } DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, std::span<const u8> buffer) { @@ -158,7 +156,7 @@ DriverResult JoyconCommonProtocol::SendVibrationReport(std::span<const u8> buffe DriverResult JoyconCommonProtocol::ReadRawSPI(SpiAddress addr, std::span<u8> output) { constexpr std::size_t HeaderSize = 5; - constexpr std::size_t MaxTries = 10; + constexpr std::size_t MaxTries = 5; std::size_t tries = 0; SubCommandResponse response{}; std::array<u8, sizeof(ReadSpiPacket)> buffer{}; |