mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-12-03 19:51:33 +00:00
Fix potentially missing ENet batching in mouse and UTF-8 cases
This commit is contained in:
1 parent
541e396833
commit
d5b38a3ac6
1 file changed
+4
-4
+4
-4
@@ -245,7 +245,7 @@ static bool sendInputPacket(PPACKET_HOLDER holder, bool moreData) {
|
|||||||
PACKET_SIZE(holder),
|
PACKET_SIZE(holder),
|
||||||
holder->channelId,
|
holder->channelId,
|
||||||
holder->enetPacketFlags,
|
holder->enetPacketFlags,
|
||||||
moreData);
|
moreData || LbqGetItemCount(&packetQueue) > 0);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
Limelog("Input: sendInputPacketOnControlStream() failed: %d\n", (int) err);
|
Limelog("Input: sendInputPacketOnControlStream() failed: %d\n", (int) err);
|
||||||
ListenerCallbacks.connectionTerminated(err);
|
ListenerCallbacks.connectionTerminated(err);
|
||||||
@@ -296,7 +296,7 @@ static bool sendInputPacket(PPACKET_HOLDER holder, bool moreData) {
|
|||||||
(unsigned int)(encryptedSize + sizeof(encryptedLengthPrefix)),
|
(unsigned int)(encryptedSize + sizeof(encryptedLengthPrefix)),
|
||||||
holder->channelId,
|
holder->channelId,
|
||||||
holder->enetPacketFlags,
|
holder->enetPacketFlags,
|
||||||
moreData);
|
moreData || LbqGetItemCount(&packetQueue) > 0);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
Limelog("Input: sendInputPacketOnControlStream() failed: %d\n", (int) err);
|
Limelog("Input: sendInputPacketOnControlStream() failed: %d\n", (int) err);
|
||||||
ListenerCallbacks.connectionTerminated(err);
|
ListenerCallbacks.connectionTerminated(err);
|
||||||
@@ -644,8 +644,8 @@ static void inputSendThreadProc(void* context) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Encrypt and send the input packet
|
// Encrypt and send the input packet (sendInputPacket checks packetQueue for batching)
|
||||||
if (!sendInputPacket(holder, LbqGetItemCount(&packetQueue) > 0)) {
|
if (!sendInputPacket(holder, false)) {
|
||||||
freePacketHolder(holder);
|
freePacketHolder(holder);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user