Browse Source

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.
v6.1.6
reuk 3 years ago
parent
commit
3c5f09243a
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      examples/Plugins/ReaperEmbeddedViewPluginDemo.h

+ 7
- 1
examples/Plugins/ReaperEmbeddedViewPluginDemo.h 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);


Loading…
Cancel
Save