diff --git a/Source/Core/Core/Src/BootManager.cpp b/Source/Core/Core/Src/BootManager.cpp index 60f718db53..25e3c6396e 100644 --- a/Source/Core/Core/Src/BootManager.cpp +++ b/Source/Core/Core/Src/BootManager.cpp @@ -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; } diff --git a/Source/Core/Core/Src/NetPlay.cpp b/Source/Core/Core/Src/NetPlay.cpp index 59b6a05538..45d1689abe 100644 --- a/Source/Core/Core/Src/NetPlay.cpp +++ b/Source/Core/Core/Src/NetPlay.cpp @@ -264,11 +264,7 @@ bool NetPlay::StopGame() void NetPlay::SetMemcardWriteEnabled(bool enabled) { std::lock_guard lkg(m_crit.game); - - if (m_is_running) - { - Core::g_CoreStartupParameter.bEnableMemcardSaving = enabled; - } + g_NetPlaySettings.m_WriteToMemcard = enabled; } // called from ---CPU--- thread diff --git a/Source/Core/Core/Src/NetPlay.h b/Source/Core/Core/Src/NetPlay.h index 47f8af18b9..222fb680cf 100644 --- a/Source/Core/Core/Src/NetPlay.h +++ b/Source/Core/Core/Src/NetPlay.h @@ -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 typedef std::vector NetWiimote; -#define NETPLAY_VERSION "Dolphin NetPlay 2013-07-19" +#define NETPLAY_VERSION "Dolphin NetPlay 2013-07-22" // messages enum diff --git a/Source/Core/Core/Src/NetPlayClient.cpp b/Source/Core/Core/Src/NetPlayClient.cpp index f01f2155c6..7163be001a 100644 --- a/Source/Core/Core/Src/NetPlayClient.cpp +++ b/Source/Core/Core/Src/NetPlayClient.cpp @@ -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]; } diff --git a/Source/Core/Core/Src/NetPlayServer.cpp b/Source/Core/Core/Src/NetPlayServer.cpp index 95d139f4cd..db3a41a398 100644 --- a/Source/Core/Core/Src/NetPlayServer.cpp +++ b/Source/Core/Core/Src/NetPlayServer.cpp @@ -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];