Poll the controllers with the same timing as movies for netplay. Might help prevent desyncs.

This commit is contained in:
Rachel Bryk 2013-07-19 15:01:04 -04:00
parent 2e92e3814e
commit 0e1efd7d38
3 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#include "../ConfigManager.h"
#include "../CoreTiming.h"
#include "../Movie.h"
#include "../NetPlay.h"
#include "SystemTimers.h"
#include "ProcessorInterface.h"
@ -641,7 +642,7 @@ void RunSIBuffer()
int GetTicksToNextSIPoll()
{
// Poll for input at regular intervals (once per frame) when playing or recording a movie
if (Movie::IsPlayingInput() || Movie::IsRecordingInput())
if (Movie::IsPlayingInput() || Movie::IsRecordingInput() || NetPlay::GetNetPlayPtr())
{
return SystemTimers::GetTicksPerSecond() / VideoInterface::TargetRefreshRate;
}

View File

@ -386,3 +386,8 @@ bool CWII_IPC_HLE_WiiMote::NetPlay_WiimoteInput(int, u16, const void*, u32&)
else
return false;
}
NetPlay* NetPlay::GetNetPlayPtr()
{
return netplay_ptr;
}

View File

@ -119,6 +119,7 @@ public:
//void PushPadStates(unsigned int count);
u8 GetPadNum(u8 numPAD);
static NetPlay* GetNetPlayPtr();
protected:
//void GetBufferedPad(const u8 pad_nb, NetPad* const netvalues);