From 19346dff87580c83ae10256b37347ca9a83a47b6 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 5 Nov 2014 02:16:35 -0800 Subject: [PATCH] GBA Config: Add GBAConfigGetValue --- src/gba/gba-config.c | 4 ++++ src/gba/gba-config.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/gba/gba-config.c b/src/gba/gba-config.c index f5c179384..6fbc96ac3 100644 --- a/src/gba/gba-config.c +++ b/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); } diff --git a/src/gba/gba-config.h b/src/gba/gba-config.h index 92622945f..689f2f1a1 100644 --- a/src/gba/gba-config.h +++ b/src/gba/gba-config.h @@ -34,6 +34,8 @@ void GBAConfigDeinit(struct GBAConfig*); 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);