commit d19c9e0d3426ad1b51c1b3fdacc7915052d1fce3
parent e889c58115b182364b095d60d0018c009163728f
Author: falkTX <falktx@falktx.com>
Date: Sun, 4 Jul 2021 12:48:39 +0100
Add Application::isStandalone() method
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dgl/Application.hpp b/dgl/Application.hpp
@@ -76,6 +76,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().
Idle callbacks trigger right after OS event handling and Window idle events (within the same cycle).
diff --git 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,)