Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
NetPlay: Sync across whether to save memcards or not
There's no reason this shouldn't be synced other than laziness.
  • Loading branch information
magcius committed Jul 22, 2013
1 parent 6d463d1 commit a963c62
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions Source/Core/Core/Src/BootManager.cpp
Expand Up @@ -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;
}

Expand Down
6 changes: 1 addition & 5 deletions Source/Core/Core/Src/NetPlay.cpp
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Core/Src/NetPlay.h
Expand Up @@ -35,6 +35,7 @@ struct NetSettings
{
bool m_DSPHLE;
bool m_DSPEnableJIT;
bool m_WriteToMemcard;
u8 m_Controllers[4];
};
extern NetSettings g_NetPlaySettings;
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Src/NetPlayClient.cpp
Expand Up @@ -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];
}
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Src/NetPlayServer.cpp
Expand Up @@ -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];

Expand Down

0 comments on commit a963c62

Please sign in to comment.