diff --git a/src/gba/context/config.c b/src/gba/context/config.c index db575e2e3..f7f6956fc 100644 --- a/src/gba/context/config.c +++ b/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); } diff --git a/src/gba/context/config.h b/src/gba/context/config.h index 35d822838..8d4039d92 100644 --- a/src/gba/context/config.h +++ b/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);