diff options
Diffstat (limited to 'src/input_common/udp/client.cpp')
| -rw-r--r-- | src/input_common/udp/client.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp index 3c51f72a0..5f5a9989c 100644 --- a/src/input_common/udp/client.cpp +++ b/src/input_common/udp/client.cpp | |||
| @@ -212,10 +212,11 @@ void TestCommunication(const std::string& host, u16 port, u8 pad_index, u32 clie | |||
| 212 | bool result = success_event.WaitFor(std::chrono::seconds(8)); | 212 | bool result = success_event.WaitFor(std::chrono::seconds(8)); |
| 213 | socket.Stop(); | 213 | socket.Stop(); |
| 214 | worker_thread.join(); | 214 | worker_thread.join(); |
| 215 | if (result) | 215 | if (result) { |
| 216 | success_callback(); | 216 | success_callback(); |
| 217 | else | 217 | } else { |
| 218 | failure_callback(); | 218 | failure_callback(); |
| 219 | } | ||
| 219 | }) | 220 | }) |
| 220 | .detach(); | 221 | .detach(); |
| 221 | } | 222 | } |
| @@ -228,8 +229,10 @@ CalibrationConfigurationJob::CalibrationConfigurationJob( | |||
| 228 | std::thread([=] { | 229 | std::thread([=] { |
| 229 | constexpr u16 CALIBRATION_THRESHOLD = 100; | 230 | constexpr u16 CALIBRATION_THRESHOLD = 100; |
| 230 | 231 | ||
| 231 | u16 min_x{UINT16_MAX}, min_y{UINT16_MAX}; | 232 | u16 min_x{UINT16_MAX}; |
| 232 | u16 max_x{}, max_y{}; | 233 | u16 min_y{UINT16_MAX}; |
| 234 | u16 max_x{}; | ||
| 235 | u16 max_y{}; | ||
| 233 | 236 | ||
| 234 | Status current_status{Status::Initialized}; | 237 | Status current_status{Status::Initialized}; |
| 235 | SocketCallback callback{[](Response::Version version) {}, [](Response::PortInfo info) {}, | 238 | SocketCallback callback{[](Response::Version version) {}, [](Response::PortInfo info) {}, |
| @@ -239,8 +242,9 @@ CalibrationConfigurationJob::CalibrationConfigurationJob( | |||
| 239 | current_status = Status::Ready; | 242 | current_status = Status::Ready; |
| 240 | status_callback(current_status); | 243 | status_callback(current_status); |
| 241 | } | 244 | } |
| 242 | if (!data.touch_1.is_active) | 245 | if (!data.touch_1.is_active) { |
| 243 | return; | 246 | return; |
| 247 | } | ||
| 244 | LOG_DEBUG(Input, "Current touch: {} {}", data.touch_1.x, | 248 | LOG_DEBUG(Input, "Current touch: {} {}", data.touch_1.x, |
| 245 | data.touch_1.y); | 249 | data.touch_1.y); |
| 246 | min_x = std::min(min_x, static_cast<u16>(data.touch_1.x)); | 250 | min_x = std::min(min_x, static_cast<u16>(data.touch_1.x)); |