diff options
| author | 2020-12-29 02:51:40 -0800 | |
|---|---|---|
| committer | 2020-12-29 02:51:40 -0800 | |
| commit | 22ba437aa4e77ee2af17501956564338d269da47 (patch) | |
| tree | 21e374452ebd0930163d284a1c487b9672d3e6ac /src/input_common/udp/client.cpp | |
| parent | Merge pull request #5233 from german77/inverted (diff) | |
| parent | udp client: process packets only for the correct pad (diff) | |
| download | yuzu-22ba437aa4e77ee2af17501956564338d269da47.tar.gz yuzu-22ba437aa4e77ee2af17501956564338d269da47.tar.xz yuzu-22ba437aa4e77ee2af17501956564338d269da47.zip | |
Merge pull request #5236 from gal20/udp_client_patch
input_common: process udp packets only for the correct pad
Diffstat (limited to 'src/input_common/udp/client.cpp')
| -rw-r--r-- | src/input_common/udp/client.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp index 17a9225d7..412d57896 100644 --- a/src/input_common/udp/client.cpp +++ b/src/input_common/udp/client.cpp | |||
| @@ -225,6 +225,11 @@ void Client::OnPortInfo([[maybe_unused]] Response::PortInfo data) { | |||
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | void Client::OnPadData(Response::PadData data, std::size_t client) { | 227 | void Client::OnPadData(Response::PadData data, std::size_t client) { |
| 228 | // Accept packets only for the correct pad | ||
| 229 | if (static_cast<u8>(clients[client].pad_index) != data.info.id) { | ||
| 230 | return; | ||
| 231 | } | ||
| 232 | |||
| 228 | LOG_TRACE(Input, "PadData packet received"); | 233 | LOG_TRACE(Input, "PadData packet received"); |
| 229 | if (data.packet_counter == clients[client].packet_sequence) { | 234 | if (data.packet_counter == clients[client].packet_sequence) { |
| 230 | LOG_WARNING( | 235 | LOG_WARNING( |