Skip to content

Commit e953ea6

Browse files
committed
Android: enable mutltithreading public-ip / weather detection
1 parent de72c98 commit e953ea6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ cmake_dependent_option(ENABLE_LIBCJSON "Enable libcjson" ON "LINUX OR WIN32" OFF
7171
cmake_dependent_option(ENABLE_LIBNM "Enable libnm" ON "LINUX" OFF)
7272
cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
7373
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR BSD" OFF)
74-
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND AND NOT ANDROID" OFF)
74+
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
7575
cmake_dependent_option(ENABLE_BUFFER "Enable stdout buffer" ON "LINUX OR APPLE OR BSD OR WIN32 OR ANDROID" OFF)
7676
cmake_dependent_option(USE_WIN_NTAPI "Allow using internal NTAPI" ON "WIN32" OFF)
7777

src/fastfetch.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,11 +1527,14 @@ int main(int argc, const char** argv)
15271527
if(ffStrbufContainIgnCaseS(&data.structure, "CPUUsage"))
15281528
ffPrepareCPUUsage();
15291529

1530-
if(ffStrbufContainIgnCaseS(&data.structure, "PublicIp"))
1531-
ffPreparePublicIp(&instance);
1530+
if(instance.config.multithreading)
1531+
{
1532+
if(ffStrbufContainIgnCaseS(&data.structure, "PublicIp"))
1533+
ffPreparePublicIp(&instance);
15321534

1533-
if(ffStrbufContainIgnCaseS(&data.structure, "Weather"))
1534-
ffPrepareWeather(&instance);
1535+
if(ffStrbufContainIgnCaseS(&data.structure, "Weather"))
1536+
ffPrepareWeather(&instance);
1537+
}
15351538

15361539
ffStart(&instance);
15371540

0 commit comments

Comments
 (0)