Skip to content
Permalink
Browse files
Merge pull request #8605 from Techjar/netplay-hostpoll-doc
Core/NetPlayClient: Add documentation for SendPadHostPoll
  • Loading branch information
Tilka committed Feb 9, 2020
2 parents 2e25403 + e8e41d8 commit 3cec544
Showing 1 changed file with 12 additions and 0 deletions.
@@ -2045,6 +2045,18 @@ bool NetPlayClient::PollLocalPad(const int local_pad, sf::Packet& packet)

void NetPlayClient::SendPadHostPoll(const PadIndex pad_num)
{
// Here we handle polling for the Host Input Authority and Golf modes. Pad data is "polled" from
// the most recent data received for the given pad. Passing pad_num < 0 will poll all assigned
// pads (used for batched polls), while 0..3 will poll the respective pad (used for MMIO polls).
// See GetNetPads for more details.
//
// If the local buffer is non-empty, we skip actually buffering and sending new pad data, this way
// don't end up with permanent local latency. It does create a period of time where no inputs are
// accepted, but under typical circumstances this is not noticeable.
//
// Additionally, we wait until some actual pad data has been received before buffering and sending
// it, otherwise controllers get calibrated wrongly with the default values of GCPadStatus.

if (m_local_player->pid != m_current_golfer)
return;

0 comments on commit 3cec544

Please sign in to comment.