diff options
| author | Rachel Bryk <RachelBryk@gmail.com> | 2013-07-19 15:01:04 -0400 |
|---|---|---|
| committer | Rachel Bryk <RachelBryk@gmail.com> | 2013-07-19 15:01:04 -0400 |
| commit | 0e1efd7d3894799aac3ccaf9eeadf22d0cdbdc88 (patch) | |
| tree | ef3c1725d100b7cc4afeac22f7fec79a5fa975f1 /Source/Core | |
| parent | 2e92e3814e6590a3dc2a96fb37759b7eaa5df217 (diff) | |
Poll the controllers with the same timing as movies for netplay. Might help prevent desyncs.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/HW/SI.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/Core/Src/NetPlay.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/Core/Src/NetPlay.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/Core/Src/HW/SI.cpp b/Source/Core/Core/Src/HW/SI.cpp index f4fcec5743..5d34cef284 100644 --- a/Source/Core/Core/Src/HW/SI.cpp +++ b/Source/Core/Core/Src/HW/SI.cpp @@ -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; } diff --git a/Source/Core/Core/Src/NetPlay.cpp b/Source/Core/Core/Src/NetPlay.cpp index 7f4b838ffc..56944dec00 100644 --- a/Source/Core/Core/Src/NetPlay.cpp +++ b/Source/Core/Core/Src/NetPlay.cpp @@ -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; +} diff --git a/Source/Core/Core/Src/NetPlay.h b/Source/Core/Core/Src/NetPlay.h index 7bed7c6421..05d999e604 100644 --- a/Source/Core/Core/Src/NetPlay.h +++ b/Source/Core/Core/Src/NetPlay.h @@ -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); |
