From 24a36eb027285c282f8dc995dd1f1bc664389003 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sun, 13 Oct 2019 13:03:09 -0500 Subject: [PATCH] NetPlay: Allow Wii Remote buffer size to decrease by dropping reports. --- Source/Core/Core/NetPlayClient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 9d67cf7a0d..e2c5731e15 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -1926,15 +1926,15 @@ bool NetPlayClient::WiimoteUpdate(int _number, u8* data, const u8 size, u8 repor if (m_wiimote_map[_number] == m_local_player->pid) { nw.assign(data, data + size); - do + + // TODO: add a seperate setting for wiimote buffer? + while (m_wiimote_buffer[_number].Size() <= m_target_buffer_size * 200 / 120) { // add to buffer m_wiimote_buffer[_number].Push(nw); SendWiimoteState(_number, nw); - } while (m_wiimote_buffer[_number].Size() <= - m_target_buffer_size * 200 / - 120); // TODO: add a seperate setting for wiimote buffer? + } } } // unlock players