Android support part 3

This commit is contained in:
Linus Dierheimer
2022-01-10 15:20:51 +01:00
parent e95e1e3530
commit 190974e079
4 changed files with 45 additions and 23 deletions
+5 -3
View File
@@ -269,8 +269,10 @@ FFvariant ffSettingsGetXFConf(FFinstance* instance, const char* channelName, con
#ifdef __ANDROID__
#include <sys/system_properties.h>
void ffSettingsGetAndroidProperty(const char* propName, FFstrbuf* result) {
ffStrbufEnsureCapacity(result, PROP_VALUE_MAX);
result->length = (uint32_t) __system_property_get(propName, result->chars);
bool ffSettingsGetAndroidProperty(const char* propName, FFstrbuf* result) {
uint32_t originalLength = result->length;
ffStrbufEnsureFree(result, PROP_VALUE_MAX);
result->length += (uint32_t) __system_property_get(propName, result->chars + result->length);
return result->length > originalLength;
}
#endif