NetPlayClient: Make the NetSettings instance part of the NetPlayClient class

This is only ever read from externally, so we can expose a getter that ensures that
immutability, while making the actual instance internal. Given the
filling out of these settings depends on packets received by the client
instance, it makes more sense to make it a part of the client itself.

This trims off one lingering global.
This commit is contained in:
Lioncash
2018-07-09 15:52:31 -04:00
parent 68731995b5
commit f209f5f2a4
4 changed files with 36 additions and 20 deletions

View File

@ -336,7 +336,7 @@ bool BootCore(std::unique_ptr<BootParameters> boot)
if (NetPlay::IsNetPlayRunning())
{
const NetPlay::NetSettings& netplay_settings = NetPlay::g_NetPlaySettings;
const NetPlay::NetSettings& netplay_settings = NetPlay::GetNetSettings();
Config::AddLayer(ConfigLoaders::GenerateNetPlayConfigLoader(netplay_settings));
StartUp.bCPUThread = netplay_settings.m_CPUthread;
StartUp.bEnableCheats = netplay_settings.m_EnableCheats;