Browse Source

Allow to call Application::quit() from plugins

pull/327/head
falkTX 3 years ago
parent
commit
27c173f68f
5 changed files with 6 additions and 8 deletions
  1. +0
    -1
      dgl/Application.hpp
  2. +0
    -2
      dgl/src/Application.cpp
  3. +0
    -2
      dgl/src/ApplicationPrivateData.cpp
  4. +5
    -0
      distrho/src/DistrhoPluginVST2.cpp
  5. +1
    -3
      distrho/src/DistrhoUIInternal.hpp

+ 0
- 1
dgl/Application.hpp View File

@@ -64,7 +64,6 @@ public:
Quit the application.
This stops the event-loop and closes all Windows.
This function is thread-safe.
@note This function is meant for standalones only, *never* call this from plugins.
*/
void quit();



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

@@ -43,8 +43,6 @@ void Application::exec(const uint idleTimeInMs)

void Application::quit()
{
DISTRHO_SAFE_ASSERT_RETURN(pData->isStandalone,);

pData->quit();
}



+ 0
- 2
dgl/src/ApplicationPrivateData.cpp View File

@@ -127,8 +127,6 @@ void Application::PrivateData::idle(const uint timeoutInMs)

void Application::PrivateData::quit()
{
DISTRHO_SAFE_ASSERT_RETURN(isStandalone,);

if (! isThisTheMainThread(mainThreadHandle))
{
if (! isQuittingInNextCycle)


+ 5
- 0
distrho/src/DistrhoPluginVST2.cpp View File

@@ -202,6 +202,11 @@ public:
# endif
}

~UIVst()
{
fUI.quit();
}

// -------------------------------------------------------------------

void idle()


+ 1
- 3
distrho/src/DistrhoUIInternal.hpp View File

@@ -228,9 +228,7 @@ public:
void quit()
{
uiData->window->close();

if (uiData->app.isStandalone())
uiData->app.quit();
uiData->app.quit();
}

// -------------------------------------------------------------------


Loading…
Cancel
Save