aboutsummaryrefslogtreecommitdiff
path: root/src/input_common
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2023-10-15 02:11:00 -0600
committergerman77 <juangerman-13@hotmail.com>2023-10-15 02:13:51 -0600
commit83c63997ff92345a97e0fe1921bff80ddfe55abc (patch)
tree730210864ab2926cafd7d84f3be5c987cb913348 /src/input_common
parent7dc6c3c81632a3afb3a1bcbf6629a69b66ae1b59 (diff)
input_common: udp: Avoid crash when trying to map motion before client is ready
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/drivers/udp_client.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp
index 808b21069f..77db60e929 100644
--- a/src/input_common/drivers/udp_client.cpp
+++ b/src/input_common/drivers/udp_client.cpp
@@ -338,6 +338,7 @@ void UDPClient::StartCommunication(std::size_t client, const std::string& host,
for (std::size_t index = 0; index < PADS_PER_CLIENT; ++index) {
const PadIdentifier identifier = GetPadIdentifier(client * PADS_PER_CLIENT + index);
PreSetController(identifier);
+ PreSetMotion(identifier, 0);
}
}