diff options
| author | 2023-06-28 08:38:45 -0600 | |
|---|---|---|
| committer | 2023-06-29 01:07:39 -0600 | |
| commit | ac755476cdaa8bace9c86183125d34dbe4c8cee9 (patch) | |
| tree | 4e808e1d2783dc230d9a194effc970453cffa8ff /src/input_common/helpers/joycon_protocol/ringcon.cpp | |
| parent | input_common: Remove duplicated DriverResult enum (diff) | |
| download | yuzu-ac755476cdaa8bace9c86183125d34dbe4c8cee9.tar.gz yuzu-ac755476cdaa8bace9c86183125d34dbe4c8cee9.tar.xz yuzu-ac755476cdaa8bace9c86183125d34dbe4c8cee9.zip | |
input_common: Allow timeouts to happen while scanning for a ring
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/ringcon.cpp')
| -rw-r--r-- | src/input_common/helpers/joycon_protocol/ringcon.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input_common/helpers/joycon_protocol/ringcon.cpp b/src/input_common/helpers/joycon_protocol/ringcon.cpp index f31ff6b34..96414fb67 100644 --- a/src/input_common/helpers/joycon_protocol/ringcon.cpp +++ b/src/input_common/helpers/joycon_protocol/ringcon.cpp | |||
| @@ -70,7 +70,7 @@ Common::Input::DriverResult RingConProtocol::StartRingconPolling() { | |||
| 70 | 70 | ||
| 71 | Common::Input::DriverResult RingConProtocol::IsRingConnected(bool& is_connected) { | 71 | Common::Input::DriverResult RingConProtocol::IsRingConnected(bool& is_connected) { |
| 72 | LOG_DEBUG(Input, "IsRingConnected"); | 72 | LOG_DEBUG(Input, "IsRingConnected"); |
| 73 | constexpr std::size_t max_tries = 28; | 73 | constexpr std::size_t max_tries = 42; |
| 74 | SubCommandResponse output{}; | 74 | SubCommandResponse output{}; |
| 75 | std::size_t tries = 0; | 75 | std::size_t tries = 0; |
| 76 | is_connected = false; | 76 | is_connected = false; |
| @@ -78,7 +78,8 @@ Common::Input::DriverResult RingConProtocol::IsRingConnected(bool& is_connected) | |||
| 78 | do { | 78 | do { |
| 79 | const auto result = SendSubCommand(SubCommand::GET_EXTERNAL_DEVICE_INFO, {}, output); | 79 | const auto result = SendSubCommand(SubCommand::GET_EXTERNAL_DEVICE_INFO, {}, output); |
| 80 | 80 | ||
| 81 | if (result != Common::Input::DriverResult::Success) { | 81 | if (result != Common::Input::DriverResult::Success && |
| 82 | result != Common::Input::DriverResult::Timeout) { | ||
| 82 | return result; | 83 | return result; |
| 83 | } | 84 | } |
| 84 | 85 | ||