DEV9: Sockets, Treat UDP connections with nearby src/dst ports as fixed

Only doing this for equal ports proved too strict for some games.
This commit is contained in:
TheLastRar 2023-01-26 19:16:13 +00:00 committed by refractionpcsx2
parent ccc1874a4b
commit 64a8e66bac
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ bool SocketAdapter::SendUDP(ConnectionKey Key, IP_Packet* ipPkt)
{
UDP_Session* s = nullptr;
if (udp.sourcePort == udp.destinationPort || //Used for LAN games that assume the destination port
if (abs(udp.sourcePort - udp.destinationPort) <= 10 || //Used for games that assume the destination/source port
ipPkt->destinationIP == dhcpServer.broadcastIP || //Broadcast packets
ipPkt->destinationIP == IP_Address{{{255, 255, 255, 255}}} || //Limited Broadcast packets
(ipPkt->destinationIP.bytes[0] & 0xF0) == 0xE0) //Multicast address start with 0b1110