mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-12 07:12:42 +02:00
Proxy host context menu items for VST3 plugins
This wasn't implemented yet because no plugin tried using the interface in this way before this, but Surge XT incorporates the host's context menu items into their own (much more elaborate) context menu. To accommodate this, we now copy over all of the host's prepopulated context menu items to the Wine plugin host, and calling the targets associated with any of those items will cause the target on the associated context menu item on the host to be called. This is slightly more complicated than what would otherwise be necessary because Bitwig does not assign tags to their context menu items and instead always uses 0.
This commit is contained in:
@@ -387,10 +387,13 @@ void Vst3Bridge::run() {
|
||||
const auto& [instance, _] =
|
||||
get_instance(request.owner_instance_id);
|
||||
|
||||
// This is of course only used for calling plugin defined
|
||||
// targets from the host, this will never be called when the
|
||||
// host calls their own targets for whatever reason
|
||||
return instance.registered_context_menus
|
||||
.at(request.context_menu_id)
|
||||
.get()
|
||||
.context_menu_targets_[request.target_tag]
|
||||
.plugin_targets_[request.target_tag]
|
||||
->executeMenuItem(request.tag);
|
||||
},
|
||||
[&](YaEditController::SetComponentState& request)
|
||||
|
||||
Reference in New Issue
Block a user