mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 15:48:51 +00:00
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:
parent
68731995b5
commit
f209f5f2a4
4 changed files with 36 additions and 20 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue