summaryrefslogtreecommitdiffstats
path: root/src/input_common/helpers/joycon_protocol
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2023-06-25 02:48:45 +0200
committergerman77 <juangerman-13@hotmail.com>2023-06-25 02:59:55 +0200
commit5aa208e26417a455abced9c067f75e1b81f2cb80 (patch)
treeeff9bb064170291d8724fdc59ff2540f17b49b01 /src/input_common/helpers/joycon_protocol
parentMerge pull request #10891 from german77/sdl28v2 (diff)
downloadyuzu-5aa208e26417a455abced9c067f75e1b81f2cb80.tar
yuzu-5aa208e26417a455abced9c067f75e1b81f2cb80.tar.gz
yuzu-5aa208e26417a455abced9c067f75e1b81f2cb80.tar.bz2
yuzu-5aa208e26417a455abced9c067f75e1b81f2cb80.tar.lz
yuzu-5aa208e26417a455abced9c067f75e1b81f2cb80.tar.xz
yuzu-5aa208e26417a455abced9c067f75e1b81f2cb80.tar.zst
yuzu-5aa208e26417a455abced9c067f75e1b81f2cb80.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/helpers/joycon_protocol/common_protocol.cpp8
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{};