NetPlay: Add some missing synced settings

This commit is contained in:
Techjar 2021-05-20 05:32:07 -04:00
parent 1d175e7e13
commit a47fcdcbec
4 changed files with 10 additions and 0 deletions

View File

@ -39,9 +39,11 @@ public:
layer->Set(Config::MAIN_SLOT_B, static_cast<int>(m_settings.m_EXIDevice[1]));
layer->Set(Config::MAIN_SERIAL_PORT_1, static_cast<int>(m_settings.m_EXIDevice[2]));
layer->Set(Config::MAIN_WII_SD_CARD_WRITABLE, m_settings.m_WriteToMemcard);
layer->Set(Config::MAIN_RAM_OVERRIDE_ENABLE, m_settings.m_RAMOverrideEnable);
layer->Set(Config::MAIN_MEM1_SIZE, m_settings.m_Mem1Size);
layer->Set(Config::MAIN_MEM2_SIZE, m_settings.m_Mem2Size);
layer->Set(Config::MAIN_FALLBACK_REGION, m_settings.m_FallbackRegion);
layer->Set(Config::MAIN_ALLOW_SD_WRITES, m_settings.m_AllowSDWrites);
layer->Set(Config::MAIN_DSP_JIT, m_settings.m_DSPEnableJIT);
for (size_t i = 0; i < Config::SYSCONF_SETTINGS.size(); ++i)

View File

@ -656,6 +656,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
packet >> m_net_settings.m_DSPEnableJIT;
packet >> m_net_settings.m_DSPHLE;
packet >> m_net_settings.m_WriteToMemcard;
packet >> m_net_settings.m_RAMOverrideEnable;
packet >> m_net_settings.m_Mem1Size;
packet >> m_net_settings.m_Mem2Size;
@ -665,6 +666,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
m_net_settings.m_FallbackRegion = static_cast<DiscIO::Region>(tmp);
}
packet >> m_net_settings.m_AllowSDWrites;
packet >> m_net_settings.m_CopyWiiSave;
packet >> m_net_settings.m_OCEnable;
packet >> m_net_settings.m_OCFactor;

View File

@ -36,9 +36,11 @@ struct NetSettings
bool m_DSPHLE;
bool m_DSPEnableJIT;
bool m_WriteToMemcard;
bool m_RAMOverrideEnable;
u32 m_Mem1Size;
u32 m_Mem2Size;
DiscIO::Region m_FallbackRegion;
bool m_AllowSDWrites;
bool m_CopyWiiSave;
bool m_OCEnable;
float m_OCFactor;

View File

@ -1238,9 +1238,11 @@ bool NetPlayServer::SetupNetSettings()
settings.m_DSPHLE = Config::Get(Config::MAIN_DSP_HLE);
settings.m_DSPEnableJIT = Config::Get(Config::MAIN_DSP_JIT);
settings.m_WriteToMemcard = Config::Get(Config::NETPLAY_WRITE_SAVE_SDCARD_DATA);
settings.m_RAMOverrideEnable = Config::Get(Config::MAIN_RAM_OVERRIDE_ENABLE);
settings.m_Mem1Size = Config::Get(Config::MAIN_MEM1_SIZE);
settings.m_Mem2Size = Config::Get(Config::MAIN_MEM2_SIZE);
settings.m_FallbackRegion = Config::Get(Config::MAIN_FALLBACK_REGION);
settings.m_AllowSDWrites = Config::Get(Config::MAIN_ALLOW_SD_WRITES);
settings.m_CopyWiiSave = Config::Get(Config::NETPLAY_LOAD_WII_SAVE);
settings.m_OCEnable = Config::Get(Config::MAIN_OVERCLOCK_ENABLE);
settings.m_OCFactor = Config::Get(Config::MAIN_OVERCLOCK);
@ -1414,9 +1416,11 @@ bool NetPlayServer::StartGame()
spac << m_settings.m_DSPEnableJIT;
spac << m_settings.m_DSPHLE;
spac << m_settings.m_WriteToMemcard;
spac << m_settings.m_RAMOverrideEnable;
spac << m_settings.m_Mem1Size;
spac << m_settings.m_Mem2Size;
spac << static_cast<std::underlying_type_t<DiscIO::Region>>(m_settings.m_FallbackRegion);
spac << m_settings.m_AllowSDWrites;
spac << m_settings.m_CopyWiiSave;
spac << m_settings.m_OCEnable;
spac << m_settings.m_OCFactor;