mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-18 14:51:30 +00:00
Round down the specified packet size to the nearest multiple of 16 rather than forcing 1024 all the time
This commit is contained in:
+3
-2
@@ -223,8 +223,9 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre
|
|||||||
memcpy(&StreamConfig, streamConfig, sizeof(StreamConfig));
|
memcpy(&StreamConfig, streamConfig, sizeof(StreamConfig));
|
||||||
RemoteAddrString = strdup(serverInfo->address);
|
RemoteAddrString = strdup(serverInfo->address);
|
||||||
|
|
||||||
// Because FEC is now supported, we can only support 1024 byte packets
|
// FEC only works in 16 byte chunks, so we must round down
|
||||||
StreamConfig.packetSize = 1024;
|
// the given packet size to the nearest multiple of 16.
|
||||||
|
StreamConfig.packetSize -= StreamConfig.packetSize % 16;
|
||||||
|
|
||||||
// Extract the appversion from the supplied string
|
// Extract the appversion from the supplied string
|
||||||
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
||||||
|
|||||||
Reference in New Issue
Block a user