diff --git a/Source/Core/Common/Config/Config.cpp b/Source/Core/Common/Config/Config.cpp index bcfb9a2619..5c69f27365 100644 --- a/Source/Core/Common/Config/Config.cpp +++ b/Source/Core/Common/Config/Config.cpp @@ -91,6 +91,9 @@ void Save() void Init() { + // These layers contain temporary values + s_layers[LayerType::CommandLine] = std::make_unique(LayerType::CommandLine); + ClearCurrentRunLayer(); // This layer always has to exist s_layers[LayerType::Meta] = std::make_unique(); } @@ -101,6 +104,11 @@ void Shutdown() s_callbacks.clear(); } +void ClearCurrentRunLayer() +{ + s_layers[LayerType::CurrentRun] = std::make_unique(LayerType::CurrentRun); +} + static const std::map system_to_name = { {System::Main, "Dolphin"}, {System::GCPad, "GCPad"}, {System::WiiPad, "Wiimote"}, {System::GCKeyboard, "GCKeyboard"}, {System::GFX, "Graphics"}, {System::Logger, "Logger"}, diff --git a/Source/Core/Common/Config/Config.h b/Source/Core/Common/Config/Config.h index ac5b1b5e4d..3ce1833345 100644 --- a/Source/Core/Common/Config/Config.h +++ b/Source/Core/Common/Config/Config.h @@ -40,6 +40,7 @@ void Save(); void Init(); void Shutdown(); +void ClearCurrentRunLayer(); const std::string& GetSystemName(System system); System GetSystemFromName(const std::string& system); diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 21dfe22ffa..e8fe2bd2c2 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -421,6 +421,7 @@ void Stop() void RestoreConfig() { + Config::ClearCurrentRunLayer(); Config::RemoveLayer(Config::LayerType::Movie); Config::RemoveLayer(Config::LayerType::Netplay); Config::RemoveLayer(Config::LayerType::GlobalGame);