Android: enable mutltithreading public-ip / weather detection

This commit is contained in:
李通洲
2023-02-24 17:45:50 +08:00
parent de72c98a28
commit e953ea6542
2 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ cmake_dependent_option(ENABLE_LIBCJSON "Enable libcjson" ON "LINUX OR WIN32" OFF
cmake_dependent_option(ENABLE_LIBNM "Enable libnm" ON "LINUX" OFF)
cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR BSD" OFF)
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND AND NOT ANDROID" OFF)
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
cmake_dependent_option(ENABLE_BUFFER "Enable stdout buffer" ON "LINUX OR APPLE OR BSD OR WIN32 OR ANDROID" OFF)
cmake_dependent_option(USE_WIN_NTAPI "Allow using internal NTAPI" ON "WIN32" OFF)
+7 -4
View File
@@ -1527,11 +1527,14 @@ int main(int argc, const char** argv)
if(ffStrbufContainIgnCaseS(&data.structure, "CPUUsage"))
ffPrepareCPUUsage();
if(ffStrbufContainIgnCaseS(&data.structure, "PublicIp"))
ffPreparePublicIp(&instance);
if(instance.config.multithreading)
{
if(ffStrbufContainIgnCaseS(&data.structure, "PublicIp"))
ffPreparePublicIp(&instance);
if(ffStrbufContainIgnCaseS(&data.structure, "Weather"))
ffPrepareWeather(&instance);
if(ffStrbufContainIgnCaseS(&data.structure, "Weather"))
ffPrepareWeather(&instance);
}
ffStart(&instance);