Config: Add layers CommandLine and CurrentRun

This commit is contained in:
MerryMage 2017-05-13 23:34:49 +01:00
parent 41afe78a44
commit 1e766ab490
3 changed files with 10 additions and 0 deletions

View File

@ -91,6 +91,9 @@ void Save()
void Init()
{
// These layers contain temporary values
s_layers[LayerType::CommandLine] = std::make_unique<Layer>(LayerType::CommandLine);
ClearCurrentRunLayer();
// This layer always has to exist
s_layers[LayerType::Meta] = std::make_unique<RecursiveLayer>();
}
@ -101,6 +104,11 @@ void Shutdown()
s_callbacks.clear();
}
void ClearCurrentRunLayer()
{
s_layers[LayerType::CurrentRun] = std::make_unique<Layer>(LayerType::CurrentRun);
}
static const std::map<System, std::string> system_to_name = {
{System::Main, "Dolphin"}, {System::GCPad, "GCPad"}, {System::WiiPad, "Wiimote"},
{System::GCKeyboard, "GCKeyboard"}, {System::GFX, "Graphics"}, {System::Logger, "Logger"},

View File

@ -40,6 +40,7 @@ void Save();
void Init();
void Shutdown();
void ClearCurrentRunLayer();
const std::string& GetSystemName(System system);
System GetSystemFromName(const std::string& system);

View File

@ -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);