NetPlay: Sync across whether to save memcards or not

There's no reason this shouldn't be synced other than laziness.
This commit is contained in:
Jasper St. Pierre 2013-07-22 06:15:08 -04:00
parent 6d463d1b67
commit a963c621dc
5 changed files with 6 additions and 6 deletions

View File

@ -139,6 +139,7 @@ bool BootCore(const std::string& _rFilename)
if (NetPlay::GetNetPlayPtr())
{
StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE;
StartUp.bEnableMemcardSaving = g_NetPlaySettings.m_WriteToMemcard;
SConfig::GetInstance().m_EnableJIT = g_NetPlaySettings.m_DSPEnableJIT;
}

View File

@ -264,11 +264,7 @@ bool NetPlay::StopGame()
void NetPlay::SetMemcardWriteEnabled(bool enabled)
{
std::lock_guard<std::recursive_mutex> lkg(m_crit.game);
if (m_is_running)
{
Core::g_CoreStartupParameter.bEnableMemcardSaving = enabled;
}
g_NetPlaySettings.m_WriteToMemcard = enabled;
}
// called from ---CPU--- thread

View File

@ -35,6 +35,7 @@ struct NetSettings
{
bool m_DSPHLE;
bool m_DSPEnableJIT;
bool m_WriteToMemcard;
u8 m_Controllers[4];
};
extern NetSettings g_NetPlaySettings;
@ -46,7 +47,7 @@ struct Rpt : public std::vector<u8>
typedef std::vector<Rpt> NetWiimote;
#define NETPLAY_VERSION "Dolphin NetPlay 2013-07-19"
#define NETPLAY_VERSION "Dolphin NetPlay 2013-07-22"
// messages
enum

View File

@ -195,6 +195,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
packet >> m_current_game;
packet >> g_NetPlaySettings.m_DSPEnableJIT;
packet >> g_NetPlaySettings.m_DSPHLE;
packet >> g_NetPlaySettings.m_WriteToMemcard;
for (unsigned int i = 0; i < 4; ++i)
packet >> g_NetPlaySettings.m_Controllers[i];
}

View File

@ -607,6 +607,7 @@ bool NetPlayServer::StartGame(const std::string &path)
spac << NetPlay::m_current_game;
spac << g_NetPlaySettings.m_DSPEnableJIT;
spac << g_NetPlaySettings.m_DSPHLE;
spac << g_NetPlaySettings.m_WriteToMemcard;
for (unsigned int i = 0; i < 4; ++i)
spac << g_NetPlaySettings.m_Controllers[i];