You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to register the "csurf_inst" from a loaded VST3 plugin, to listen for tracks selection changes, and it's producing a bug.
This is the code:
void registerCSurf() {
auto reaper = // queryInterface(IReaperHostApplication::iid ...
if (reaper)
{
auto registerFunc = static_cast<int (*)(const char*, void*)>(reaper->getReaperApi("plugin_register"));
if (registerFunc)
{
if (1 == registerFunc("csurf_inst", this)) // *this* implements IReaperControlSurface.
{
Log::debug("register csurf_inst Ok");
}
}
//reaper->release();
}
}
The registerFunc returns 1, but no function (Run,OnTrackSelection,SetSurfaceXXX..) gets called.
But what happens is that the selection becomes broken, I can't deselect tracks, unmute ...
The text was updated successfully, but these errors were encountered:
It's hard to know exactly what's going on based on the limited scope of your code, but it's likely that you need to change the register line to be: if (1 == registerFunc("csurf_inst", (void *)(IReaperControlSurface*)this))
otherwise, the cast to void * will not know which interface it should be passing
I'm trying to register the "csurf_inst" from a loaded VST3 plugin, to listen for tracks selection changes, and it's producing a bug.
This is the code:
The
registerFunc
returns 1, but no function (Run,OnTrackSelection,SetSurfaceXXX..) gets called.But what happens is that the selection becomes broken, I can't deselect tracks, unmute ...
The text was updated successfully, but these errors were encountered: