From 6ee03336ab0a15dba4da78dbf7413624228c5db5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 8 Jul 2022 02:28:09 +0100 Subject: [PATCH] Report plugin UI close in embed mode Signed-off-by: falkTX --- source/Makefile.deps.mk | 1 + source/Makefile.mk | 3 +++ source/backend/engine/CarlaEngineNative.cpp | 11 +++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/source/Makefile.deps.mk b/source/Makefile.deps.mk index 85b3b4fe2..f079a04e4 100644 --- a/source/Makefile.deps.mk +++ b/source/Makefile.deps.mk @@ -366,6 +366,7 @@ HAVE_PYQT = false HAVE_QT4 = false HAVE_QT5 = false HAVE_QT5PKG = false +HAVE_SDL = false USING_JUCE = false USING_JUCE_AUDIO_DEVICES = false USING_RTAUDIO = false diff --git a/source/Makefile.mk b/source/Makefile.mk index 890f4d685..16e739247 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -83,6 +83,9 @@ endif ifeq ($(DEBUG),true) BASE_FLAGS += -DDEBUG -O0 -g LINK_OPTS = +ifeq ($(WASM),true) +LINK_OPTS += -sASSERTIONS=1 +endif else BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden CXXFLAGS += -fvisibility-inlines-hidden diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp index ff6c6bdc4..d5ad446f5 100644 --- a/source/backend/engine/CarlaEngineNative.cpp +++ b/source/backend/engine/CarlaEngineNative.cpp @@ -308,13 +308,15 @@ public: { fParameters[rindex] = valuef; + if (fUsesEmbed #ifndef CARLA_ENGINE_WITHOUT_UI - if (fUsesEmbed || fUiServer.isPipeRunning()) + || fUiServer.isPipeRunning() +#endif + ) { pHost->ui_parameter_changed(pHost->handle, rindex, valuef); } else -#endif { static uint last_pluginId = pluginId; static int last_value1 = value1; @@ -333,6 +335,11 @@ public: } break; + case ENGINE_CALLBACK_UI_STATE_CHANGED: + if (sendHost && fUsesEmbed) + pHost->ui_closed(pHost->handle); + break; + default: break; }