mirror of https://github.com/mgba-emu/mgba.git
GBA Config: Add more APIs
This commit is contained in:
parent
a7cb0ec85c
commit
04b6cf5e4c
|
@ -224,6 +224,18 @@ const char* GBAConfigGetValue(const struct GBAConfig* config, const char* key) {
|
||||||
return _lookupValue(config, 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) {
|
void GBAConfigSetValue(struct GBAConfig* config, const char* key, const char* value) {
|
||||||
ConfigurationSetValue(&config->configTable, config->port, key, value);
|
ConfigurationSetValue(&config->configTable, config->port, key, value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,9 @@ void GBAConfigMakePortable(const struct GBAConfig*);
|
||||||
void GBAConfigDirectory(char* out, size_t outLength);
|
void GBAConfigDirectory(char* out, size_t outLength);
|
||||||
|
|
||||||
const char* GBAConfigGetValue(const struct GBAConfig*, const char* key);
|
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 GBAConfigSetValue(struct GBAConfig*, const char* key, const char* value);
|
||||||
void GBAConfigSetIntValue(struct GBAConfig*, const char* key, int value);
|
void GBAConfigSetIntValue(struct GBAConfig*, const char* key, int value);
|
||||||
|
|
Loading…
Reference in New Issue