2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

udp client: process packets only for the correct pad

This commit is contained in:
gal20 2020-12-27 22:22:48 +02:00
parent 0dc4ab42cc
commit 1defd0847a

View file

@ -225,6 +225,11 @@ void Client::OnPortInfo([[maybe_unused]] Response::PortInfo data) {
} }
void Client::OnPadData(Response::PadData data, std::size_t client) { 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"); LOG_TRACE(Input, "PadData packet received");
if (data.packet_counter == clients[client].packet_sequence) { if (data.packet_counter == clients[client].packet_sequence) {
LOG_WARNING( LOG_WARNING(