all repos — mgba @ 19346dff87580c83ae10256b37347ca9a83a47b6

mGBA Game Boy Advance Emulator

GBA Config: Add GBAConfigGetValue
Jeffrey Pfau jeffrey@endrift.com
Wed, 05 Nov 2014 02:16:35 -0800
commit

19346dff87580c83ae10256b37347ca9a83a47b6

parent

37212c1f238d25448cfde5a3ec16ca23ab036658

2 files changed, 6 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-config.csrc/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.hsrc/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);