NetPlay: Sync CPU engine between NetPlay clients/servers

This commit is contained in:
Jasper St. Pierre 2014-01-08 17:58:27 -05:00
parent 216f4c927a
commit 3046d0e701
5 changed files with 6 additions and 1 deletions

View File

@ -215,6 +215,7 @@ bool BootCore(const std::string& _rFilename)
StartUp.bCPUThread = g_NetPlaySettings.m_CPUthread;
StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE;
StartUp.bEnableMemcardSaving = g_NetPlaySettings.m_WriteToMemcard;
StartUp.iCPUCore = g_NetPlaySettings.m_CPUcore;
SConfig::GetInstance().m_EnableJIT = g_NetPlaySettings.m_DSPEnableJIT;
SConfig::GetInstance().m_EXIDevice[0] = g_NetPlaySettings.m_EXIDevice[0];
SConfig::GetInstance().m_EXIDevice[1] = g_NetPlaySettings.m_EXIDevice[1];

View File

@ -266,6 +266,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
std::lock_guard<std::recursive_mutex> lkg(m_crit.game);
packet >> m_current_game;
packet >> g_NetPlaySettings.m_CPUthread;
packet >> g_NetPlaySettings.m_CPUcore;
packet >> g_NetPlaySettings.m_DSPEnableJIT;
packet >> g_NetPlaySettings.m_DSPHLE;
packet >> g_NetPlaySettings.m_WriteToMemcard;

View File

@ -12,6 +12,7 @@
struct NetSettings
{
bool m_CPUthread;
int m_CPUcore;
bool m_DSPHLE;
bool m_DSPEnableJIT;
bool m_WriteToMemcard;
@ -27,7 +28,7 @@ struct Rpt : public std::vector<u8>
typedef std::vector<u8> NetWiimote;
#define NETPLAY_VERSION "Dolphin NetPlay 2013-09-22"
#define NETPLAY_VERSION "Dolphin NetPlay 2014-01-08"
const int NETPLAY_INITIAL_GCTIME = 1272737767;

View File

@ -536,6 +536,7 @@ bool NetPlayServer::StartGame(const std::string &path)
spac << (MessageId)NP_MSG_START_GAME;
spac << m_current_game;
spac << m_settings.m_CPUthread;
spac << m_settings.m_CPUcore;
spac << m_settings.m_DSPEnableJIT;
spac << m_settings.m_DSPHLE;
spac << m_settings.m_WriteToMemcard;

View File

@ -409,6 +409,7 @@ void NetPlayDiag::GetNetSettings(NetSettings &settings)
{
SConfig &instance = SConfig::GetInstance();
settings.m_CPUthread = instance.m_LocalCoreStartupParameter.bCPUThread;
settings.m_CPUcore = instance.m_LocalCoreStartupParameter.iCPUCore;
settings.m_DSPHLE = instance.m_LocalCoreStartupParameter.bDSPHLE;
settings.m_DSPEnableJIT = instance.m_EnableJIT;
settings.m_WriteToMemcard = m_memcard_write->GetValue();