dolphin-emulator/Source/Core/Common
Léo Lam abe6f8766a 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));
2017-02-23 18:15:12 +01:00
..
Crypto Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
GL Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
Logging IOS: Re-implement USB_HIDv4 (/dev/usb/hid) 2017-02-05 11:36:49 +01:00
Align.h Common: Add alignment header 2016-12-06 20:33:53 +01:00
Analytics.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Analytics.h Remove curl version check / include curl.h 2016-08-04 22:39:45 -05:00
Arm64Emitter.cpp JitArm64: Optimize GPR register push/pop. 2017-02-11 00:59:12 +01:00
Arm64Emitter.h JitArm64: Implement divwx 2016-10-29 13:35:23 +02:00
ArmCommon.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
ArmCPUDetect.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Assert.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Atomic.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Atomic_GCC.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Atomic_Win32.h Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
BitField.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
BitField.natvis Correct capitalization of 'Visual Studio' 2015-11-02 17:12:09 +13:00
BitSet.h constexpr added to BitSet.h. conflicts solved 2016-06-25 10:58:53 -03:00
BitUtils.h Common: Add bit utility header 2017-01-14 11:16:02 -05:00
BlockingLoop.h BlockingLoop: Yield to UI message pump while waiting. 2016-11-11 13:37:02 +01:00
CDUtils.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
CDUtils.h Add missing license headers 2015-05-25 13:11:47 +02:00
ChunkFile.h Fix ChunkFile for std::set 2017-01-14 19:00:19 +01:00
CMakeLists.txt New configuration namespace 2017-02-23 18:15:11 +01:00
CodeBlock.h CodeBlock: Const correctness for IsInSpace 2017-01-08 18:40:09 -05:00
ColorUtil.cpp ColorUtil: Make decodeCI8image's pal parameter const 2017-01-13 17:07:26 -05:00
ColorUtil.h ColorUtil: Make decodeCI8image's pal parameter const 2017-01-13 17:07:26 -05:00
Common.h DolphinWX: Remove HAVE_WX preprocessor define 2017-01-24 05:48:08 +01:00
Common.vcxproj New configuration namespace 2017-02-23 18:15:11 +01:00
Common.vcxproj.filters New configuration namespace 2017-02-23 18:15:11 +01:00
CommonFuncs.h Don't use generic byteswapping on Android 2017-01-06 13:56:53 +01:00
CommonPaths.h Copy Wii save for current game for Netplay and TAS 2017-02-05 13:17:05 -05:00
CommonTypes.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Config.cpp Config: Trigger callbacks on layer save 2017-02-23 18:15:12 +01:00
Config.h Config: Add a few helper functions for repetitive tasks 2017-02-23 18:15:12 +01:00
CPUDetect.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
DebugInterface.h DebugInterface: Make GetRawMemoryString return a std::string 2016-10-07 10:26:26 -04:00
ENetUtil.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
ENetUtil.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Event.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
FifoQueue.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
FileSearch.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
FileSearch.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
FileUtil.cpp Copy Wii save for current game for Netplay and TAS 2017-02-05 13:17:05 -05:00
FileUtil.h Copy Wii save for current game for Netplay and TAS 2017-02-05 13:17:05 -05:00
FixedSizeQueue.h FixedSizeQueue: modernize (std::array, std::move) 2016-06-25 17:39:54 +02:00
Flag.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
FPURoundMode.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
GekkoDisassembler.cpp Add precision about the names of r1, r2 and r13 for the register view 2016-11-02 01:13:00 -04:00
GekkoDisassembler.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
GenericCPUDetect.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
GenericFPURoundMode.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Hash.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Hash.h More asterisks 2016-01-21 21:16:51 +01:00
IniFile.cpp Translate Swedish in example strings to English 2017-02-04 22:51:01 +01:00
IniFile.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Intrinsics.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
JitRegister.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
JitRegister.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
LibusbContext.cpp Notify user that USB won't work if libusb init fails 2017-02-07 00:47:21 +01:00
LibusbContext.h Use a single libusb context 2017-02-05 11:36:48 +01:00
LinearDiskCache.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
make_scmrev.h.js scmrev: Add "distributor" option. 2016-06-18 18:31:40 +02:00
MathUtil.cpp specify custom brace style to fix unions 2017-01-05 12:55:13 +01:00
MathUtil.h C++ conformance fixes (MSVC /permissive-) 2017-02-15 20:37:04 -08:00
MD5.cpp Add md5 testing to netplay 2016-07-16 22:48:46 +02:00
MD5.h Add md5 testing to netplay 2016-07-16 22:48:46 +02:00
MemArena.cpp Support for dynamic BAT modification (dynamic-bat). 2016-09-06 08:43:22 +02:00
MemArena.h Support for dynamic BAT modification (dynamic-bat). 2016-09-06 08:43:22 +02:00
MemoryUtil.cpp Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
MemoryUtil.h MemoryUtil: Fix formatting 2016-09-24 22:41:53 +02:00
Misc.cpp Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
MsgHandler.cpp Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
MsgHandler.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
NandPaths.cpp Remove pre-generated SYSCONF 2017-01-12 21:30:11 +01:00
NandPaths.h Remove pre-generated SYSCONF 2017-01-12 21:30:11 +01:00
Network.cpp Common: Namespace Network.h/.cpp 2017-01-17 20:46:48 -05:00
Network.h Common: Namespace Network.h/.cpp 2017-01-17 20:46:48 -05:00
NonCopyable.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
PcapFile.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
PcapFile.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
PerformanceCounter.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
PerformanceCounter.h Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Profiler.cpp Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
Profiler.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
scmrev.h.in CMake: use configure_file to generate scmrev.h 2017-02-05 22:26:49 -08:00
SCMRevGen.vcxproj Fix SCMRevGen for 64-bit MSBuild 2016-07-13 17:28:55 +02:00
ScopeGuard.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
SDCardUtil.cpp Core: Remove double newlines at the end of *_LOG messages. 2016-11-02 02:09:33 +00:00
SDCardUtil.h Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Semaphore.h Common: Add a Semaphore wrapper class 2016-10-01 01:09:12 +10:00
SettingsHandler.cpp SettingsHandler: Make GenerateSerialNumber static 2017-01-27 10:29:57 -05:00
SettingsHandler.h SettingsHandler: Make GenerateSerialNumber static 2017-01-27 10:29:57 -05:00
StringUtil.cpp Translate Swedish in example strings to English 2017-02-04 22:51:01 +01:00
StringUtil.h Import/Export signature files as CSV 2016-12-18 00:27:10 +00:00
SymbolDB.cpp SymbolDB: Simplify GetSymbolsFromHash 2017-02-18 06:30:20 -05:00
SymbolDB.h SymbolDB: Use set to map hash with symbols 2016-12-19 21:03:29 +00:00
SysConf.cpp Remove pre-generated SYSCONF 2017-01-12 21:30:11 +01:00
SysConf.h Remove pre-generated SYSCONF 2017-01-12 21:30:11 +01:00
Thread.cpp Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
Thread.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Timer.cpp Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
Timer.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
TraversalClient.cpp Improve netplay setup dialog UX 2016-07-23 20:58:51 +02:00
TraversalClient.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
TraversalProto.h specify custom brace style to fix unions 2017-01-05 12:55:13 +01:00
TraversalServer.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
ucrtFreadWorkaround.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Version.cpp Fix in-tree build (cmake .) on OS X. 2016-06-25 23:57:17 -04:00
x64ABI.cpp x64Emitter: Generify ABI_CallFunction variants 2016-08-31 22:54:47 -04:00
x64ABI.h x64Emitter: Generify ABI_CallFunction variants 2016-08-31 22:54:47 -04:00
x64CPUDetect.cpp Fix missing includes 2017-01-24 03:31:51 +01:00
x64Emitter.cpp Jit64: Enable branch following. 2017-01-28 02:48:56 +01:00
x64Emitter.h Jit64: Enable branch following. 2017-01-28 02:48:56 +01:00
x64FPURoundMode.cpp Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
x64Reg.h x64Emitter: Generify ABI_CallFunction variants 2016-08-31 22:54:47 -04:00