Separate host detection and printing logic

This commit is contained in:
Linus Dierheimer
2022-09-04 12:43:30 +02:00
parent 542ad5eab6
commit d387800bda
13 changed files with 312 additions and 181 deletions
+2 -3
View File
@@ -352,10 +352,9 @@ int ffSettingsGetSQLite3Int(const FFinstance* instance, const char* dbPath, cons
#ifdef __ANDROID__
#include <sys/system_properties.h>
bool ffSettingsGetAndroidProperty(const char* propName, FFstrbuf* result) {
uint32_t originalLength = result->length;
void ffSettingsGetAndroidProperty(const char* propName, FFstrbuf* result) {
ffStrbufEnsureFree(result, PROP_VALUE_MAX);
result->length += (uint32_t) __system_property_get(propName, result->chars + result->length);
return result->length > originalLength;
result->chars[result->length] = '\0';
}
#endif
+1 -1
View File
@@ -33,7 +33,7 @@ FFvariant ffSettingsGetXFConf(FFinstance* instance, const char* channelName, con
int ffSettingsGetSQLite3Int(const FFinstance* instance, const char* dbPath, const char* query);
#ifdef __ANDROID__
bool ffSettingsGetAndroidProperty(const char* propName, FFstrbuf* result);
void ffSettingsGetAndroidProperty(const char* propName, FFstrbuf* result);
#endif
#endif