GBA Config: Add more APIs

This commit is contained in:
Jeffrey Pfau 2015-09-17 19:49:45 -07:00
parent a7cb0ec85c
commit 04b6cf5e4c
2 changed files with 15 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);