Browse Source

Fix ildaeil crash when carla side has UI disabled

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.07
falkTX 2 years ago
parent
commit
fd3a21add0
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 16 additions and 8 deletions
  1. +1
    -1
      carla
  2. +1
    -1
      dpf
  3. +14
    -6
      plugins/Cardinal/src/Ildaeil.cpp

+ 1
- 1
carla

@@ -1 +1 @@
Subproject commit 33bd1f94b33c53e208bb13d09a567a02976b9f1f
Subproject commit 6ee03336ab0a15dba4da78dbf7413624228c5db5

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit aa99d51731cf915d83abb578c232b89fbad6c231
Subproject commit b9e654c3d331933dbeae0413246be8dc2bd64a58

+ 14
- 6
plugins/Cardinal/src/Ildaeil.cpp View File

@@ -575,11 +575,6 @@ static void host_ui_custom_data_changed(NativeHostHandle handle, const char* key
d_stdout("%s %p %s %s", __FUNCTION__, handle, key, value);
}

static void host_ui_closed(NativeHostHandle handle)
{
d_stdout("%s %p", __FUNCTION__, handle);
}

static const char* host_ui_save_file(NativeHostHandle, bool, const char*, const char*)
{
return nullptr;
@@ -806,6 +801,12 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner {
setDirty(true);
}

void closeUI() noexcept
{
if (fIdleState == kIdleGiveIdleToUI)
fIdleState = kIdleNothing;
}

void openFileFromDSP(bool /* isDir */, const char* const title, const char* /* filter */)
{
DISTRHO_SAFE_ASSERT_RETURN(idleCallbackActive,);
@@ -1083,7 +1084,8 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner {
break;

case kIdleGiveIdleToUI:
module->fCarlaPluginDescriptor->ui_idle(module->fCarlaPluginHandle);
if (module->fCarlaPluginDescriptor->ui_idle != nullptr)
module->fCarlaPluginDescriptor->ui_idle(module->fCarlaPluginHandle);
break;

case kIdleChangePluginType:
@@ -1634,6 +1636,12 @@ static void host_ui_parameter_changed(const NativeHostHandle handle, const uint3
ui->changeParameterFromDSP(index, value);
}

static void host_ui_closed(const NativeHostHandle handle)
{
if (IldaeilWidget* const ui = static_cast<IldaeilWidget*>(static_cast<IldaeilModule*>(handle)->fUI))
ui->closeUI();
}

static const char* host_ui_open_file(const NativeHostHandle handle,
const bool isDir, const char* const title, const char* const filter)
{


Loading…
Cancel
Save