From 7b3b7bacf5b57afd294603642811e72452847f17 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 4 Jan 2022 14:44:18 +0000 Subject: [PATCH] Fix UI::getBundlePath() for VST2 --- distrho/src/DistrhoPluginVST2.cpp | 4 ++-- distrho/src/DistrhoUIInternal.hpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distrho/src/DistrhoPluginVST2.cpp b/distrho/src/DistrhoPluginVST2.cpp index 6d55f4ff..fc2ef318 100644 --- a/distrho/src/DistrhoPluginVST2.cpp +++ b/distrho/src/DistrhoPluginVST2.cpp @@ -189,7 +189,7 @@ public: sendNoteCallback, setSizeCallback, nullptr, // TODO file request - nullptr, + d_nextBundlePath, plugin->getInstancePointer(), scaleFactor) # if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI @@ -705,7 +705,7 @@ public: else { UIExporter tmpUI(nullptr, 0, fPlugin.getSampleRate(), - nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, + nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, d_nextBundlePath, fPlugin.getInstancePointer(), fLastScaleFactor); fVstRect.right = tmpUI.getWidth(); fVstRect.bottom = tmpUI.getHeight(); diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp index 041981d5..31d97f0d 100644 --- a/distrho/src/DistrhoUIInternal.hpp +++ b/distrho/src/DistrhoUIInternal.hpp @@ -62,6 +62,7 @@ public: uiData(new UI::PrivateData()) { uiData->sampleRate = sampleRate; + uiData->bundlePath = bundlePath != nullptr ? strdup(bundlePath) : nullptr; uiData->dspPtr = dspPtr; uiData->bgColor = bgColor;