mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Update the context menu status
This commit is contained in:
@@ -34,9 +34,6 @@
|
||||
* the user clicks on them. As far as I'm aware, not a single Linux VST3 host
|
||||
* implements `IComponentHandler3` and thus provides support for these context
|
||||
* menus.
|
||||
*
|
||||
* TODO: None of this has been tested because I have not run into any plugins
|
||||
* that use `IComponentHandler3` yet.
|
||||
*/
|
||||
class Vst3ContextMenuProxy : public YaContextMenu {
|
||||
public:
|
||||
|
||||
@@ -195,6 +195,11 @@ Vst3PluginBridge::Vst3PluginBridge()
|
||||
},
|
||||
[&](const YaContextMenu::Popup& request)
|
||||
-> YaContextMenu::Popup::Response {
|
||||
// FIXME: In REAPER having the menu open without interacting
|
||||
// with it causes malloc failures or failing font
|
||||
// drawing calls. Valgrind reports all kinds of
|
||||
// memory errors within REAPER when this happens, and
|
||||
// I'm not sure if yabridge is to blame here.
|
||||
return plugin_proxies.at(request.owner_instance_id)
|
||||
.get()
|
||||
.context_menus.at(request.context_menu_id)
|
||||
|
||||
@@ -70,6 +70,8 @@ tresult PLUGIN_API Vst3ContextMenuProxyImpl::getItem(
|
||||
tresult PLUGIN_API
|
||||
Vst3ContextMenuProxyImpl::addItem(const Steinberg::Vst::IContextMenuItem& item,
|
||||
Steinberg::Vst::IContextMenuTarget* target) {
|
||||
// TODO: I haven't come across a plugin that adds its own items, so this
|
||||
// hasn't been tested yet
|
||||
const tresult result = bridge.send_message(YaContextMenu::AddItem{
|
||||
.owner_instance_id = owner_instance_id(),
|
||||
.context_menu_id = context_menu_id(),
|
||||
|
||||
Reference in New Issue
Block a user