Add "Reduce Polling Rate" option to NetPlay

Normally, SI is polled at a rate defined by the game, and we have to send the pad state to other clients on every poll or else we'll desync. This can result in fairly high bandwidth usage, especially with multiple controllers, mostly due to UDP/IP overhead.

This change introduces an option to reduce the SI poll rate to once per frame, which may introduce up to one frame of additional latency, but will reduce bandwidth usage substantially, which is useful for users on very slow internet connections.

Polling SI less frequently than the game asked for did not seem to cause any problems in my testing, so this should be perfectly safe to do.
This commit is contained in:
Techjar
2018-06-29 16:48:30 -04:00
parent e22c5333ab
commit 5adeca4087
11 changed files with 30 additions and 5 deletions

View File

@ -103,7 +103,8 @@ struct DTMHeader
bool bNetPlay;
bool bPAL60;
u8 language;
std::array<u8, 11> reserved; // Padding for any new config options
bool bReducePollingRate;
std::array<u8, 10> reserved; // Padding for any new config options
std::array<char, 40> discChange; // Name of iso file to switch to, for two disc games.
std::array<u8, 20> revision; // Git hash
u32 DSPiromHash;
@ -186,4 +187,4 @@ void SetWiiInputManip(WiiManipFunction);
void CallGCInputManip(GCPadStatus* PadStatus, int controllerID);
void CallWiiInputManip(u8* core, WiimoteEmu::ReportFeatures rptf, int controllerID, int ext,
const wiimote_key key);
}
} // namespace Movie