mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 13:00:02 +02:00
Track registered context menus
So we can refer to them when the host executes a menu item later.
This commit is contained in:
@@ -21,7 +21,9 @@
|
||||
Vst3ContextMenuProxyImpl::Vst3ContextMenuProxyImpl(
|
||||
Vst3Bridge& bridge,
|
||||
Vst3ContextMenuProxy::ConstructArgs&& args)
|
||||
: Vst3ContextMenuProxy(std::move(args)), bridge(bridge) {}
|
||||
: Vst3ContextMenuProxy(std::move(args)), bridge(bridge) {
|
||||
bridge.register_context_menu(*this);
|
||||
}
|
||||
|
||||
Vst3ContextMenuProxyImpl::~Vst3ContextMenuProxyImpl() {
|
||||
// Also drop the context menu smart pointer on plugin side when this gets
|
||||
@@ -29,6 +31,7 @@ Vst3ContextMenuProxyImpl::~Vst3ContextMenuProxyImpl() {
|
||||
bridge.send_message(
|
||||
Vst3ContextMenuProxy::Destruct{.owner_instance_id = owner_instance_id(),
|
||||
.context_menu_id = context_menu_id()});
|
||||
bridge.unregister_context_menu(owner_instance_id(), context_menu_id());
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
|
||||
Reference in New Issue
Block a user