1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

REAPER Demo: Check opcode index before running embedded UI commands

The comment at the top of reaper_plugin_fx_embed.h specifies that the
'index' parameter for the embedded UI feature will always be set to
effEditDraw.
This commit is contained in:
reuk 2021-07-10 20:15:21 +01:00
parent 3d8ffd3abf
commit 3c5f09243a
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -67,6 +67,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wshadow-field-in-constructor",
#include <pluginterfaces/base/ftypes.h>
#include <pluginterfaces/base/funknown.h>
#include <pluginterfaces/vst/ivsthostapplication.h>
#include <pluginterfaces/vst2.x/aeffect.h>
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
@ -274,11 +275,16 @@ public:
return 0;
}
pointer_sized_int handleVstManufacturerSpecific (int32,
pointer_sized_int handleVstManufacturerSpecific (int32 index,
pointer_sized_int value,
void* ptr,
float opt) override
{
// The docstring at the top of reaper_plugin_fx_embed.h specifies
// that the index will always be effEditDraw, which is now deprecated.
if (index != __effEditDrawDeprecated)
return 0;
return (pointer_sized_int) handledEmbeddedUIMessage ((int) opt,
(Steinberg::TPtrInt) value,
(Steinberg::TPtrInt) ptr);