mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
Merge pull request #5853 from leoetlino/onionconfig-fix
Config: Fix the loader Load() being called twice
This commit is contained in:
commit
131c97e87c
@ -38,17 +38,6 @@ void AddLayer(std::unique_ptr<ConfigLayerLoader> loader)
|
||||
AddLayer(std::make_unique<Layer>(std::move(loader)));
|
||||
}
|
||||
|
||||
void AddLoadLayer(std::unique_ptr<Layer> layer)
|
||||
{
|
||||
layer->Load();
|
||||
AddLayer(std::move(layer));
|
||||
}
|
||||
|
||||
void AddLoadLayer(std::unique_ptr<ConfigLayerLoader> loader)
|
||||
{
|
||||
AddLoadLayer(std::make_unique<Layer>(std::move(loader)));
|
||||
}
|
||||
|
||||
Layer* GetLayer(LayerType layer)
|
||||
{
|
||||
if (!LayerExists(layer))
|
||||
|
@ -43,8 +43,6 @@ Section* GetOrCreateSection(System system, const std::string& section_name);
|
||||
Layers* GetLayers();
|
||||
void AddLayer(std::unique_ptr<Layer> layer);
|
||||
void AddLayer(std::unique_ptr<ConfigLayerLoader> loader);
|
||||
void AddLoadLayer(std::unique_ptr<Layer> layer);
|
||||
void AddLoadLayer(std::unique_ptr<ConfigLayerLoader> loader);
|
||||
Layer* GetLayer(LayerType layer);
|
||||
void RemoveLayer(LayerType layer);
|
||||
bool LayerExists(LayerType layer);
|
||||
|
@ -244,8 +244,8 @@ bool BootCore(std::unique_ptr<BootParameters> boot)
|
||||
std::string game_id = SConfig::GetInstance().GetGameID();
|
||||
u16 revision = SConfig::GetInstance().GetRevision();
|
||||
|
||||
Config::AddLoadLayer(ConfigLoaders::GenerateGlobalGameConfigLoader(game_id, revision));
|
||||
Config::AddLoadLayer(ConfigLoaders::GenerateLocalGameConfigLoader(game_id, revision));
|
||||
Config::AddLayer(ConfigLoaders::GenerateGlobalGameConfigLoader(game_id, revision));
|
||||
Config::AddLayer(ConfigLoaders::GenerateLocalGameConfigLoader(game_id, revision));
|
||||
|
||||
IniFile game_ini = StartUp.LoadGameIni();
|
||||
|
||||
@ -357,7 +357,7 @@ bool BootCore(std::unique_ptr<BootParameters> boot)
|
||||
|
||||
if (NetPlay::IsNetPlayRunning())
|
||||
{
|
||||
Config::AddLoadLayer(ConfigLoaders::GenerateNetPlayConfigLoader(g_NetPlaySettings));
|
||||
Config::AddLayer(ConfigLoaders::GenerateNetPlayConfigLoader(g_NetPlaySettings));
|
||||
StartUp.bCPUThread = g_NetPlaySettings.m_CPUthread;
|
||||
StartUp.bEnableCheats = g_NetPlaySettings.m_EnableCheats;
|
||||
StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE;
|
||||
|
@ -33,7 +33,7 @@ namespace UICommon
|
||||
void Init()
|
||||
{
|
||||
Config::Init();
|
||||
Config::AddLoadLayer(ConfigLoaders::GenerateBaseConfigLoader());
|
||||
Config::AddLayer(ConfigLoaders::GenerateBaseConfigLoader());
|
||||
SConfig::Init();
|
||||
LogManager::Init();
|
||||
VideoBackendBase::PopulateList();
|
||||
|
Loading…
Reference in New Issue
Block a user