BootManager: Use local SConfig reference when possible

This commit is contained in:
JosJuice 2017-01-22 16:40:26 +01:00
parent 2e2eabdfcb
commit c847a5258f
1 changed files with 13 additions and 16 deletions

View File

@ -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<SIDevices>(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