mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 04:50:43 +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
|
* 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
|
* implements `IComponentHandler3` and thus provides support for these context
|
||||||
* menus.
|
* menus.
|
||||||
*
|
|
||||||
* TODO: None of this has been tested because I have not run into any plugins
|
|
||||||
* that use `IComponentHandler3` yet.
|
|
||||||
*/
|
*/
|
||||||
class Vst3ContextMenuProxy : public YaContextMenu {
|
class Vst3ContextMenuProxy : public YaContextMenu {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -195,6 +195,11 @@ Vst3PluginBridge::Vst3PluginBridge()
|
|||||||
},
|
},
|
||||||
[&](const YaContextMenu::Popup& request)
|
[&](const YaContextMenu::Popup& request)
|
||||||
-> YaContextMenu::Popup::Response {
|
-> 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)
|
return plugin_proxies.at(request.owner_instance_id)
|
||||||
.get()
|
.get()
|
||||||
.context_menus.at(request.context_menu_id)
|
.context_menus.at(request.context_menu_id)
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ tresult PLUGIN_API Vst3ContextMenuProxyImpl::getItem(
|
|||||||
tresult PLUGIN_API
|
tresult PLUGIN_API
|
||||||
Vst3ContextMenuProxyImpl::addItem(const Steinberg::Vst::IContextMenuItem& item,
|
Vst3ContextMenuProxyImpl::addItem(const Steinberg::Vst::IContextMenuItem& item,
|
||||||
Steinberg::Vst::IContextMenuTarget* target) {
|
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{
|
const tresult result = bridge.send_message(YaContextMenu::AddItem{
|
||||||
.owner_instance_id = owner_instance_id(),
|
.owner_instance_id = owner_instance_id(),
|
||||||
.context_menu_id = context_menu_id(),
|
.context_menu_id = context_menu_id(),
|
||||||
|
|||||||
Reference in New Issue
Block a user