diff --git a/dgl/Application.hpp b/dgl/Application.hpp index 7e726845..e8f3f811 100644 --- a/dgl/Application.hpp +++ b/dgl/Application.hpp @@ -75,6 +75,12 @@ public: */ bool isQuiting() const noexcept; + /** + Check if the application is standalone, otherwise running as a module or plugin. + This function is thread-safe. + */ + bool isStandalone() const noexcept; + /** Add a callback function to be triggered on every idle cycle. You can add more than one, and remove them at anytime with removeIdleCallback(). diff --git a/dgl/src/Application.cpp b/dgl/src/Application.cpp index bd2c1969..07f8278d 100644 --- a/dgl/src/Application.cpp +++ b/dgl/src/Application.cpp @@ -53,6 +53,11 @@ bool Application::isQuiting() const noexcept return pData->isQuitting || pData->isQuittingInNextCycle; } +bool Application::isStandalone() const noexcept +{ + return pData->isStandalone; +} + void Application::addIdleCallback(IdleCallback* const callback) { DISTRHO_SAFE_ASSERT_RETURN(callback != nullptr,)