mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
LV2 Host: Avoid removing anchors from plugin URIs when loading editors
This commit is contained in:
parent
578d2b9d15
commit
242e93e41e
1 changed files with 6 additions and 13 deletions
|
|
@ -2579,15 +2579,8 @@ public:
|
|||
File bundlePath;
|
||||
URL pluginUri;
|
||||
|
||||
auto withBundlePath (File v) const noexcept { return with (&UiInstanceArgs::bundlePath, std::move (v)); }
|
||||
auto withPluginUri (URL v) const noexcept { return with (&UiInstanceArgs::pluginUri, std::move (v)); }
|
||||
|
||||
private:
|
||||
template <typename Member>
|
||||
UiInstanceArgs with (Member UiInstanceArgs::* member, Member value) const noexcept
|
||||
{
|
||||
return juce::lv2_host::with (*this, member, std::move (value));
|
||||
}
|
||||
auto withBundlePath (File v) const noexcept { return withMember (*this, &UiInstanceArgs::bundlePath, std::move (v)); }
|
||||
auto withPluginUri (URL v) const noexcept { return withMember (*this, &UiInstanceArgs::pluginUri, std::move (v)); }
|
||||
};
|
||||
|
||||
static File bundlePathFromUri (const char* uri)
|
||||
|
|
@ -2614,7 +2607,7 @@ public:
|
|||
mLV2_UI__floatProtocol (map.map (LV2_UI__floatProtocol)),
|
||||
mLV2_ATOM__atomTransfer (map.map (LV2_ATOM__atomTransfer)),
|
||||
mLV2_ATOM__eventTransfer (map.map (LV2_ATOM__eventTransfer)),
|
||||
instance (makeInstance (args.pluginUri, args.bundlePath, features)),
|
||||
instance (makeInstance (args, features)),
|
||||
idleCallback (getExtensionData<LV2UI_Idle_Interface> (world, LV2_UI__idleInterface))
|
||||
{
|
||||
jassert (descriptor != nullptr);
|
||||
|
|
@ -2682,14 +2675,14 @@ private:
|
|||
using Instance = std::unique_ptr<void, void (*) (LV2UI_Handle)>;
|
||||
using Idle = int (*) (LV2UI_Handle);
|
||||
|
||||
Instance makeInstance (const URL& pluginUri, const File& bundlePath, const LV2_Feature* const* features)
|
||||
Instance makeInstance (const UiInstanceArgs& args, const LV2_Feature* const* features)
|
||||
{
|
||||
if (descriptor->get() == nullptr)
|
||||
return { nullptr, [] (LV2UI_Handle) {} };
|
||||
|
||||
return Instance { descriptor->get()->instantiate (descriptor->get(),
|
||||
pluginUri.toString (false).toRawUTF8(),
|
||||
File::addTrailingSeparator (bundlePath.getFullPathName()).toRawUTF8(),
|
||||
args.pluginUri.toString (true).toRawUTF8(),
|
||||
File::addTrailingSeparator (args.bundlePath.getFullPathName()).toRawUTF8(),
|
||||
writeFunction,
|
||||
this,
|
||||
&widget,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue