From a67681efe39adcfc2884b35e1e2b30b3af482b36 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Oct 2022 10:51:33 +0100 Subject: [PATCH] Fix internal jack client for new main-thread-idle behaviour Signed-off-by: falkTX --- source/backend/engine/CarlaEngine.cpp | 3 ++- source/backend/engine/CarlaEngineJack.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index cc84054eb..bfae91d03 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -445,6 +445,7 @@ void CarlaEngine::idle() noexcept CARLA_SAFE_ASSERT_RETURN(getType() != kEngineTypePlugin,); const bool engineNotRunning = !isRunning(); + const bool engineHasIdleOnMainThread = hasIdleOnMainThread(); for (uint i=0; i < pData->curPluginCount; ++i) { @@ -469,7 +470,7 @@ void CarlaEngine::idle() noexcept } else { - if (hints & PLUGIN_NEEDS_MAIN_THREAD_IDLE) + if (engineHasIdleOnMainThread && (hints & PLUGIN_NEEDS_MAIN_THREAD_IDLE) != 0) { try { plugin->idle(); diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp index 56839df86..c1afb444d 100644 --- a/source/backend/engine/CarlaEngineJack.cpp +++ b/source/backend/engine/CarlaEngineJack.cpp @@ -1731,7 +1731,11 @@ public: bool hasIdleOnMainThread() const noexcept override { + #ifndef BUILD_BRIDGE + return !fIsInternalClient; + #else return true; + #endif } bool isRunning() const noexcept override