diff --git a/src/common/init.c b/src/common/init.c index 3a769de11..65bd63322 100644 --- a/src/common/init.c +++ b/src/common/init.c @@ -293,20 +293,33 @@ static inline void* startThreadsThreadMain(void* instance) return NULL; } +#if !defined(__ANDROID__) && !defined(__APPLE__) + void startDetectionThreads(FFinstance* instance) { - //Android needs none of the things that are detected here - //And using gsettings sometimes hangs the program in android for some unknown reason, - //and since we don't need it we just never call it. - #if defined(__ANDROID__) || defined(__APPLE__) - return; - #endif - pthread_t startThreadsThread; pthread_create(&startThreadsThread, NULL, startThreadsThreadMain, instance); pthread_detach(startThreadsThread); } +#elif __APPLE__ + +void startDetectionThreads(FFinstance* instance) +{ + pthread_t startThreadsThread; + pthread_create(&startThreadsThread, NULL, connectDisplayServerThreadMain, instance); + pthread_detach(startThreadsThread); +} + +#else // !__APPLE__ + +void startDetectionThreads(FFinstance* instance) +{ + FF_UNUSED(instance); +} + +#endif // __ANDROID__ + static volatile bool ffDisableLinewrap = true; static volatile bool ffHideCursor = true;