Implement support for userbuffers on Wii U

The Wii U socket implementation has limited memory available. To support larger receive buffers, application memory needs to be provided.
To make sockets use this user memory the `SO_RUSRBUF` option needs to be set on the socket.
This commit is contained in:
GaryOderNichts 2024-02-18 17:00:27 +01:00 committed by Cameron Gutman
parent 8af4562af6
commit 3d99869c0c

View File

@ -344,6 +344,12 @@ SOCKET bindUdpSocket(int addressFamily, struct sockaddr_storage* localAddr, SOCK
Limelog("WSAIoctl(SIO_UDP_CONNRESET) failed: %d\n", LastSocketError());
}
}
#elif defined(__WIIU__)
{
// Enable usage of userbuffers on Wii U
int val = 1;
setsockopt(s, SOL_SOCKET, SO_RUSRBUF, &val, sizeof(val));
}
#endif
// Enable QOS for the socket (best effort)