mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 06:29:00 +01:00
Poll the controllers with the same timing as movies for netplay. Might help prevent desyncs.
This commit is contained in:
parent
2e92e3814e
commit
0e1efd7d38
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user