mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
NetPlay: Make the enet interrupts work
Otherwise, it would work but any async sending would be delayed by 4ms or wait until the next packet was received. Also increase the client timeout to 250ms, since enet_host_service is now really interrupted.
This commit is contained in:
@ -301,7 +301,8 @@ void TraversalClient::Reset()
|
||||
int ENET_CALLBACK TraversalClient::InterceptCallback(ENetHost* host, ENetEvent* event)
|
||||
{
|
||||
auto traversalClient = g_TraversalClient.get();
|
||||
if (traversalClient->TestPacket(host->receivedData, host->receivedDataLength, &host->receivedAddress))
|
||||
if (traversalClient->TestPacket(host->receivedData, host->receivedDataLength, &host->receivedAddress)
|
||||
|| (host->receivedDataLength == 1 && host->receivedData[0] == 0))
|
||||
{
|
||||
event->type = (ENetEventType)42;
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user