commit be5bb8a48757fe7b261b90110404cdbbdebad3e1
parent 345c971aead2b08c8fe6af91bea25c0acf04d2c3
Author: falkTX <falktx@falktx.com>
Date: Sat, 12 Jun 2021 00:56:55 +0100
VST2: Set properties->shortLabel too
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp
@@ -1446,8 +1446,18 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t
{
memset(properties, 0, sizeof(VstParameterProperties));
+ // full name
DISTRHO_NAMESPACE::strncpy(properties->label, plugin.getParameterName(index), VestigeMaxLabelLen);
+ // short name
+ const String& shortName(plugin.getParameterShortName(index));
+
+ if (shortName.isNotEmpty())
+ DISTRHO_NAMESPACE::strncpy(properties->shortLabel,
+ plugin.getParameterShortName(index),
+ VestigeMaxShortLabelLen);
+
+ // parameter hints
const uint32_t hints = plugin.getParameterHints(index);
if (hints & kParameterIsOutput)
@@ -1460,9 +1470,8 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t
if (hints & kParameterIsInteger)
{
- properties->flags |= kVstParameterUsesIntegerMinMax;
const ParameterRanges& ranges(plugin.getParameterRanges(index));
-
+ properties->flags |= kVstParameterUsesIntegerMinMax;
properties->minInteger = static_cast<int32_t>(ranges.min);
properties->maxInteger = static_cast<int32_t>(ranges.max);
}