Skip to content

Commit

Permalink
Merge pull request #8403 from jordan-woyak/netplay-wiimote-buffer-fix
Browse files Browse the repository at this point in the history
NetPlay: Allow Wii Remote buffer size to decrease
  • Loading branch information
Helios747 committed Oct 16, 2019
2 parents 4b1567c + 24a36eb commit 6a15de5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Core/Core/NetPlayClient.cpp
Expand Up @@ -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) if (m_wiimote_map[_number] == m_local_player->pid)
{ {
nw.assign(data, data + size); 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 // add to buffer
m_wiimote_buffer[_number].Push(nw); m_wiimote_buffer[_number].Push(nw);


SendWiimoteState(_number, 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 } // unlock players
Expand Down

0 comments on commit 6a15de5

Please sign in to comment.