NetPlay: Add additional comments for host input authority mode
This commit is contained in:
parent
0cc3ae72a5
commit
1ba834d13c
|
@ -1452,6 +1452,10 @@ bool NetPlayClient::GetNetPads(const int pad_nb, const bool batching, GCPadStatu
|
|||
|
||||
if (m_host_input_authority && !m_local_player->IsHost())
|
||||
{
|
||||
// CoreTiming acts funny and causes what looks like frame skip if
|
||||
// we toggle the emulation speed too quickly, so to prevent this
|
||||
// we wait until the buffer has been over for at least 1 second.
|
||||
|
||||
const bool buffer_over_target = m_pad_buffer[pad_nb].Size() > m_target_buffer_size + 1;
|
||||
if (!buffer_over_target)
|
||||
m_buffer_under_target_last = std::chrono::steady_clock::now();
|
||||
|
|
|
@ -157,6 +157,10 @@ protected:
|
|||
Common::Flag m_is_running{false};
|
||||
Common::Flag m_do_loop{true};
|
||||
|
||||
// In non-host input authority mode, this is how many packets each client should
|
||||
// try to keep in-flight to the other clients. In host input authority mode, this is how
|
||||
// many incoming input packets need to be queued up before the client starts
|
||||
// speeding up the game to drain the buffer.
|
||||
unsigned int m_target_buffer_size = 20;
|
||||
bool m_host_input_authority = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue