GBA Config: Add more APIs
Jeffrey Pfau jeffrey@endrift.com
Thu, 17 Sep 2015 19:49:45 -0700
2 files changed,
15 insertions(+),
0 deletions(-)
M
src/gba/context/config.c
→
src/gba/context/config.c
@@ -224,6 +224,18 @@ const char* GBAConfigGetValue(const struct GBAConfig* config, const char* key) {
return _lookupValue(config, key); } +bool GBAConfigGetIntValue(const struct GBAConfig* config, const char* key, int* value) { + return _lookupIntValue(config, key, value); +} + +bool GBAConfigGetUIntValue(const struct GBAConfig* config, const char* key, unsigned* value) { + return _lookupUIntValue(config, key, value); +} + +bool GBAConfigGetFloatValue(const struct GBAConfig* config, const char* key, float* value) { + return _lookupFloatValue(config, key, value); +} + void GBAConfigSetValue(struct GBAConfig* config, const char* key, const char* value) { ConfigurationSetValue(&config->configTable, config->port, key, value); }
M
src/gba/context/config.h
→
src/gba/context/config.h
@@ -59,6 +59,9 @@ void GBAConfigMakePortable(const struct GBAConfig*);
void GBAConfigDirectory(char* out, size_t outLength); const char* GBAConfigGetValue(const struct GBAConfig*, const char* key); +bool GBAConfigGetIntValue(const struct GBAConfig*, const char* key, int* value); +bool GBAConfigGetUIntValue(const struct GBAConfig*, const char* key, unsigned* value); +bool GBAConfigGetFloatValue(const struct GBAConfig*, const char* key, float* value); void GBAConfigSetValue(struct GBAConfig*, const char* key, const char* value); void GBAConfigSetIntValue(struct GBAConfig*, const char* key, int value);