Disabled system status polling on FreeBSD and Haiku

This commit is contained in:
Leon Styhre 2025-02-24 22:06:47 +01:00
parent 677e2fbb98
commit 539e5ed57a

View file

@ -65,14 +65,14 @@ SystemStatus::SystemStatus() noexcept
getStatusWifi(); getStatusWifi();
getStatusCellular(); getStatusCellular();
getStatusBattery(); getStatusBattery();
#else #elif !defined(__FreeBSD__) && !defined(__HAIKU__)
mPollThread = std::make_unique<std::thread>(&SystemStatus::pollStatus, this); mPollThread = std::make_unique<std::thread>(&SystemStatus::pollStatus, this);
#endif #endif
} }
SystemStatus::~SystemStatus() SystemStatus::~SystemStatus()
{ {
#if !defined(__ANDROID__) #if !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__HAIKU__)
mExitPolling = true; mExitPolling = true;
if (mPollThread != nullptr && mPollThread->joinable()) { if (mPollThread != nullptr && mPollThread->joinable()) {