Browse Source

Add Application::isStandalone() method

pull/302/head
falkTX 3 years ago
parent
commit
d19c9e0d34
2 changed files with 11 additions and 0 deletions
  1. +6
    -0
      dgl/Application.hpp
  2. +5
    -0
      dgl/src/Application.cpp

+ 6
- 0
dgl/Application.hpp View File

@@ -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().


+ 5
- 0
dgl/src/Application.cpp View File

@@ -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,)


Loading…
Cancel
Save