summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorvperus <vperus@gmail.com>2021-12-17 19:51:47 +0100
committervperus <vperus@gmail.com>2021-12-17 19:51:47 +0100
commit11f4bf8a9afe109aaed0e53133781694a735e225 (patch)
tree059364422923d69de470c648f64e93cff5e7b262 /src/input_common
parentRevert of b01aa72 (diff)
downloadyuzu-11f4bf8a9afe109aaed0e53133781694a735e225.tar
yuzu-11f4bf8a9afe109aaed0e53133781694a735e225.tar.gz
yuzu-11f4bf8a9afe109aaed0e53133781694a735e225.tar.bz2
yuzu-11f4bf8a9afe109aaed0e53133781694a735e225.tar.lz
yuzu-11f4bf8a9afe109aaed0e53133781694a735e225.tar.xz
yuzu-11f4bf8a9afe109aaed0e53133781694a735e225.tar.zst
yuzu-11f4bf8a9afe109aaed0e53133781694a735e225.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/drivers/udp_client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp
index 730e8b2f3..d6172527c 100644
--- a/src/input_common/drivers/udp_client.cpp
+++ b/src/input_common/drivers/udp_client.cpp
@@ -536,8 +536,6 @@ CalibrationConfigurationJob::CalibrationConfigurationJob(
std::function<void(u16, u16, u16, u16)> data_callback) {
std::thread([=, this] {
- constexpr u16 CALIBRATION_THRESHOLD = 100;
-
u16 min_x{UINT16_MAX};
u16 min_y{UINT16_MAX};
u16 max_x{};
@@ -546,6 +544,8 @@ CalibrationConfigurationJob::CalibrationConfigurationJob(
Status current_status{Status::Initialized};
SocketCallback callback{[](Response::Version) {}, [](Response::PortInfo) {},
[&](Response::PadData data) {
+ constexpr u16 CALIBRATION_THRESHOLD = 100;
+
if (current_status == Status::Initialized) {
// Receiving data means the communication is ready now
current_status = Status::Ready;