GBA Config: Add GBAConfigGetValue
Jeffrey Pfau jeffrey@endrift.com
Wed, 05 Nov 2014 02:16:35 -0800
2 files changed,
6 insertions(+),
0 deletions(-)
M
src/gba/gba-config.c
→
src/gba/gba-config.c
@@ -100,6 +100,10 @@ bool GBAConfigSave(const struct GBAConfig* config) {
return ConfigurationWrite(&config->configTable, BINARY_NAME ".ini"); } +const char* GBAConfigGetValue(const struct GBAConfig* config, const char* key) { + return _lookupValue(config, key); +} + void GBAConfigSetValue(struct GBAConfig* config, const char* key, const char* value) { ConfigurationSetValue(&config->configTable, config->port, key, value); }
M
src/gba/gba-config.h
→
src/gba/gba-config.h
@@ -34,6 +34,8 @@
bool GBAConfigLoad(struct GBAConfig*); bool GBAConfigSave(const struct GBAConfig*); +const char* GBAConfigGetValue(const struct GBAConfig*, const char* key); + void GBAConfigSetValue(struct GBAConfig*, const char* key, const char* value); void GBAConfigSetIntValue(struct GBAConfig*, const char* key, int value); void GBAConfigSetUIntValue(struct GBAConfig*, const char* key, unsigned value);