From 8a2e7fddd178b7b1809878e09049818276b2151c Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 2 Jun 2016 22:56:15 +0200 Subject: [PATCH] Sync the "enable cheat" setting over netplay --- Source/Core/Core/BootManager.cpp | 1 + Source/Core/Core/NetPlayClient.cpp | 1 + Source/Core/Core/NetPlayProto.h | 1 + Source/Core/Core/NetPlayServer.cpp | 1 + Source/Core/DolphinWX/NetPlay/NetWindow.cpp | 1 + 5 files changed, 5 insertions(+) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 912d056bea..2ec228ff4d 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -347,6 +347,7 @@ bool BootCore(const std::string& _rFilename) if (NetPlay::IsNetPlayRunning()) { StartUp.bCPUThread = g_NetPlaySettings.m_CPUthread; + StartUp.bEnableCheats = g_NetPlaySettings.m_enableCheats; StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE; StartUp.bEnableMemcardSdWriting = g_NetPlaySettings.m_WriteToMemcard; StartUp.iCPUCore = g_NetPlaySettings.m_CPUcore; diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 9170b2b03d..076f127acc 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -367,6 +367,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet) packet >> m_current_game; packet >> g_NetPlaySettings.m_CPUthread; packet >> g_NetPlaySettings.m_CPUcore; + packet >> g_NetPlaySettings.m_enableCheats; packet >> g_NetPlaySettings.m_SelectedLanguage; packet >> g_NetPlaySettings.m_OverrideGCLanguage; packet >> g_NetPlaySettings.m_ProgressiveScan; diff --git a/Source/Core/Core/NetPlayProto.h b/Source/Core/Core/NetPlayProto.h index 09451b9b76..1bd0211074 100644 --- a/Source/Core/Core/NetPlayProto.h +++ b/Source/Core/Core/NetPlayProto.h @@ -13,6 +13,7 @@ struct NetSettings { bool m_CPUthread; int m_CPUcore; + bool m_enableCheats; int m_SelectedLanguage; bool m_OverrideGCLanguage; bool m_ProgressiveScan; diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index d21b0e86fd..9130bfd291 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -712,6 +712,7 @@ bool NetPlayServer::StartGame() *spac << m_current_game; *spac << m_settings.m_CPUthread; *spac << m_settings.m_CPUcore; + *spac << m_settings.m_enableCheats; *spac << m_settings.m_SelectedLanguage; *spac << m_settings.m_OverrideGCLanguage; *spac << m_settings.m_ProgressiveScan; diff --git a/Source/Core/DolphinWX/NetPlay/NetWindow.cpp b/Source/Core/DolphinWX/NetPlay/NetWindow.cpp index 53114a7509..a1a5e506b5 100644 --- a/Source/Core/DolphinWX/NetPlay/NetWindow.cpp +++ b/Source/Core/DolphinWX/NetPlay/NetWindow.cpp @@ -274,6 +274,7 @@ void NetPlayDialog::GetNetSettings(NetSettings& settings) SConfig& instance = SConfig::GetInstance(); settings.m_CPUthread = instance.bCPUThread; settings.m_CPUcore = instance.iCPUCore; + settings.m_enableCheats = instance.bEnableCheats; settings.m_SelectedLanguage = instance.SelectedLanguage; settings.m_OverrideGCLanguage = instance.bOverrideGCLanguage; settings.m_ProgressiveScan = instance.bProgressive;