summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference/ControlReference.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-02-16 10:59:22 +0100
committerLéo Lam <leo@innovatetechnologi.es>2017-02-23 18:15:12 +0100
commitabe6f8766a5a1d9007584b4224ba9b74fdf645f2 (patch)
treec0c63031c24543fb19b60d6470de7e3a96f2a814 /Source/Core/InputCommon/ControlReference/ControlReference.cpp
parent7bd34ac0b500127ded632750d52546c6f4df9604 (diff)
Config: Add a few helper functions for repetitive tasks
Getting and setting configuration from the base config layer are common and repetitive tasks. This commit adds some simpler to use functions to make the new system easier to work with. Config::Get and Config::Set are intended to make switching from SConfig a bit less painful. They always operate on the main system. Example usage: // before auto base_layer = Config::GetLayer(Config::LayerType::Base); auto core = base_layer->GetOrCreateSection(Config::System::Main, "Core"); u8 language; core->Get("Language", &language, 0); SetData("IPL.LNG", language); // now auto base_layer = Config::GetLayer(Config::LayerType::Base); auto core = base_layer->GetOrCreateSection(Config::System::Main, "Core"); SetData("IPL.LNG", core->Get<u8>("Language", 0)); // or simply SetData("IPL.LNG", Config::Get<u8>("Core", "Language", 0));
Diffstat (limited to 'Source/Core/InputCommon/ControlReference/ControlReference.cpp')
0 files changed, 0 insertions, 0 deletions