summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Config/Config.cpp
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2017-06-05 21:11:04 -0700
committerGitHub <noreply@github.com>2017-06-05 21:11:04 -0700
commitc8166951a0bfce3a0dab457e62b40b8649dd3c3c (patch)
tree60c742b5ba43f0759f8b1e28e51525ce63d285e4 /Source/Core/Common/Config/Config.cpp
parent192fec50b9e3a98aa625684c0a6bd016bfedbcd5 (diff)
parentb6a99e1b9c372ffd7c4a4ff58ea2ba1b95a75dff (diff)
Merge pull request #5418 from MerryMage/config-again-and-again
VideoConfig: Port to layered configuration system
Diffstat (limited to 'Source/Core/Common/Config/Config.cpp')
-rw-r--r--Source/Core/Common/Config/Config.cpp8
1 files changed, 8 insertions, 0 deletions
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<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"},