From c847a5258f4f152366e61ce00865cd96cc71c80f Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 22 Jan 2017 16:40:26 +0100 Subject: [PATCH] BootManager: Use local SConfig reference when possible --- Source/Core/Core/BootManager.cpp | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 0a028e90f3..dd3708a0c6 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -222,8 +222,8 @@ bool BootCore(const std::string& _rFilename) StartUp.m_BootType = SConfig::BOOT_ISO; StartUp.m_strFilename = _rFilename; - SConfig::GetInstance().m_LastFilename = _rFilename; - SConfig::GetInstance().SaveSettings(); + StartUp.m_LastFilename = _rFilename; + StartUp.SaveSettings(); StartUp.bRunCompareClient = false; StartUp.bRunCompareServer = false; @@ -260,16 +260,13 @@ bool BootCore(const std::string& _rFilename) core_section->Get("ProgressiveScan", &StartUp.bProgressive, StartUp.bProgressive); core_section->Get("PAL60", &StartUp.bPAL60, StartUp.bPAL60); core_section->Get("GameCubeLanguage", &StartUp.SelectedLanguage, StartUp.SelectedLanguage); - if (core_section->Get("EmulationSpeed", &SConfig::GetInstance().m_EmulationSpeed, - SConfig::GetInstance().m_EmulationSpeed)) + if (core_section->Get("EmulationSpeed", &StartUp.m_EmulationSpeed, StartUp.m_EmulationSpeed)) config_cache.bSetEmulationSpeed = true; - if (dsp_section->Get("Volume", &SConfig::GetInstance().m_Volume, - SConfig::GetInstance().m_Volume)) + if (dsp_section->Get("Volume", &StartUp.m_Volume, StartUp.m_Volume)) config_cache.bSetVolume = true; - dsp_section->Get("EnableJIT", &SConfig::GetInstance().m_DSPEnableJIT, - SConfig::GetInstance().m_DSPEnableJIT); - dsp_section->Get("Backend", &SConfig::GetInstance().sBackend, SConfig::GetInstance().sBackend); + dsp_section->Get("EnableJIT", &StartUp.m_DSPEnableJIT, StartUp.m_DSPEnableJIT); + dsp_section->Get("Backend", &StartUp.sBackend, StartUp.sBackend); VideoBackendBase::ActivateBackend(StartUp.m_strVideoBackend); core_section->Get("GPUDeterminismMode", &StartUp.m_strGPUDeterminismMode, StartUp.m_strGPUDeterminismMode); @@ -280,7 +277,7 @@ bool BootCore(const std::string& _rFilename) controls_section->Get(StringFromFormat("PadType%u", i), &source, -1); if (source >= SIDEVICE_NONE && source < SIDEVICE_COUNT) { - SConfig::GetInstance().m_SIDevice[i] = (SIDevices)source; + StartUp.m_SIDevice[i] = static_cast(source); config_cache.bSetPads[i] = true; } } @@ -351,11 +348,11 @@ bool BootCore(const std::string& _rFilename) StartUp.bOverrideGCLanguage = g_NetPlaySettings.m_OverrideGCLanguage; StartUp.bProgressive = g_NetPlaySettings.m_ProgressiveScan; StartUp.bPAL60 = g_NetPlaySettings.m_PAL60; - SConfig::GetInstance().m_DSPEnableJIT = g_NetPlaySettings.m_DSPEnableJIT; - SConfig::GetInstance().m_OCEnable = g_NetPlaySettings.m_OCEnable; - SConfig::GetInstance().m_OCFactor = g_NetPlaySettings.m_OCFactor; - SConfig::GetInstance().m_EXIDevice[0] = g_NetPlaySettings.m_EXIDevice[0]; - SConfig::GetInstance().m_EXIDevice[1] = g_NetPlaySettings.m_EXIDevice[1]; + StartUp.m_DSPEnableJIT = g_NetPlaySettings.m_DSPEnableJIT; + StartUp.m_OCEnable = g_NetPlaySettings.m_OCEnable; + StartUp.m_OCFactor = g_NetPlaySettings.m_OCFactor; + StartUp.m_EXIDevice[0] = g_NetPlaySettings.m_EXIDevice[0]; + StartUp.m_EXIDevice[1] = g_NetPlaySettings.m_EXIDevice[1]; config_cache.bSetEXIDevice[0] = true; config_cache.bSetEXIDevice[1] = true; } @@ -382,7 +379,7 @@ bool BootCore(const std::string& _rFilename) } if (StartUp.bWii) - SConfig::GetInstance().SaveSettingsToSysconf(); + StartUp.SaveSettingsToSysconf(); // Run the game // Init the core