1
0
Fork 0
mirror of https://git.h3cjp.net/H3cJP/yuzu.git synced 2024-12-22 10:57:20 +00:00

Merge pull request from gal20/udp_client_patch

input_common: process udp packets only for the correct pad
This commit is contained in:
bunnei 2020-12-29 02:51:40 -08:00 committed by GitHub
commit 22ba437aa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,6 +225,11 @@ void Client::OnPortInfo([[maybe_unused]] Response::PortInfo data) {
}
void Client::OnPadData(Response::PadData data, std::size_t client) {
// Accept packets only for the correct pad
if (static_cast<u8>(clients[client].pad_index) != data.info.id) {
return;
}
LOG_TRACE(Input, "PadData packet received");
if (data.packet_counter == clients[client].packet_sequence) {
LOG_WARNING(