all repos — mgba @ 04b6cf5e4c6582051049b45f81333d24b894418b

mGBA Game Boy Advance Emulator

GBA Config: Add more APIs
Jeffrey Pfau jeffrey@endrift.com
Thu, 17 Sep 2015 19:49:45 -0700
commit

04b6cf5e4c6582051049b45f81333d24b894418b

parent

a7cb0ec85c908589b5c8b690e75eb08484962ec3

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

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