From 123035a192d83e171e6775812dc38e5fbe75257d Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 17 Feb 2013 15:27:15 +1100 Subject: [PATCH] Bulk send TCP data to the client with the emulated USB Gecko. Fixes issue 6006. --- Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp index 93b7cd5d09..2a051ad14a 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp @@ -134,10 +134,16 @@ void GeckoSockServer::ClientThread() if (send_fifo.size()) { - if (client.Send((char*)&send_fifo.front(), sizeof(u8)) + char* packet = new char[send_fifo.size()]; + int i = 0; + while(send_fifo.size()) + { + packet[i++] = send_fifo.front(); + send_fifo.pop(); + } + if (client.Send(packet, sizeof(u8)*i) == sf::Socket::Disconnected) client_running = false; - send_fifo.pop(); } } // unlock transfer