From d5b38a3ac63927a11bebd8337df024f11eba34d5 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 11 Nov 2026 15:39:14 -0600 Subject: [PATCH] Fix potentially missing ENet batching in mouse and UTF-8 cases --- src/InputStream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/InputStream.c b/src/InputStream.c index ca5c493..79bc001 100644 --- a/src/InputStream.c +++ b/src/InputStream.c @@ -245,7 +245,7 @@ static bool sendInputPacket(PPACKET_HOLDER holder, bool moreData) { PACKET_SIZE(holder), holder->channelId, holder->enetPacketFlags, - moreData); + moreData || LbqGetItemCount(&packetQueue) > 0); if (err < 0) { Limelog("Input: sendInputPacketOnControlStream() failed: %d\n", (int) err); ListenerCallbacks.connectionTerminated(err); @@ -296,7 +296,7 @@ static bool sendInputPacket(PPACKET_HOLDER holder, bool moreData) { (unsigned int)(encryptedSize + sizeof(encryptedLengthPrefix)), holder->channelId, holder->enetPacketFlags, - moreData); + moreData || LbqGetItemCount(&packetQueue) > 0); if (err < 0) { Limelog("Input: sendInputPacketOnControlStream() failed: %d\n", (int) err); ListenerCallbacks.connectionTerminated(err); @@ -644,8 +644,8 @@ static void inputSendThreadProc(void* context) { continue; } - // Encrypt and send the input packet - if (!sendInputPacket(holder, LbqGetItemCount(&packetQueue) > 0)) { + // Encrypt and send the input packet (sendInputPacket checks packetQueue for batching) + if (!sendInputPacket(holder, false)) { freePacketHolder(holder); return; }