summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-16 12:23:48 +0200
committerLioncash <mathew1800@gmail.com>2020-10-16 12:23:51 +0200
commit30b1e71066b59304af452af65d73b6b8cbf76929 (patch)
tree250b1712e0d426636a59ddb0000eaa7dabed5da5 /src
parentudp/client: Take std::function by const reference with TestCommunication() (diff)
downloadyuzu-30b1e71066b59304af452af65d73b6b8cbf76929.tar
yuzu-30b1e71066b59304af452af65d73b6b8cbf76929.tar.gz
yuzu-30b1e71066b59304af452af65d73b6b8cbf76929.tar.bz2
yuzu-30b1e71066b59304af452af65d73b6b8cbf76929.tar.lz
yuzu-30b1e71066b59304af452af65d73b6b8cbf76929.tar.xz
yuzu-30b1e71066b59304af452af65d73b6b8cbf76929.tar.zst
yuzu-30b1e71066b59304af452af65d73b6b8cbf76929.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/udp/client.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp
index e3dd8a4be..7039d6fc3 100644
--- a/src/input_common/udp/client.cpp
+++ b/src/input_common/udp/client.cpp
@@ -337,8 +337,11 @@ void TestCommunication(const std::string& host, u16 port, std::size_t pad_index,
const std::function<void()>& failure_callback) {
std::thread([=] {
Common::Event success_event;
- SocketCallback callback{[](Response::Version version) {}, [](Response::PortInfo info) {},
- [&](Response::PadData data) { success_event.Set(); }};
+ SocketCallback callback{
+ .version = [](Response::Version) {},
+ .port_info = [](Response::PortInfo) {},
+ .pad_data = [&](Response::PadData) { success_event.Set(); },
+ };
Socket socket{host, port, pad_index, client_id, std::move(callback)};
std::thread worker_thread{SocketLoop, &socket};
const bool result = success_event.WaitFor(std::chrono::seconds(8));