Browse Source

VST3: fix controller state never updated when separate

Signed-off-by: falkTX <falktx@falktx.com>
pull/375/head
falkTX 3 years ago
parent
commit
e623a70ac8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 9 additions and 3 deletions
  1. +7
    -1
      distrho/src/DistrhoPluginVST3.cpp
  2. +2
    -2
      distrho/src/DistrhoUIVST3.cpp

+ 7
- 1
distrho/src/DistrhoPluginVST3.cpp View File

@@ -2056,11 +2056,17 @@ public:
#if DISTRHO_PLUGIN_WANT_STATE
if (std::strcmp(msgid, "state-set") == 0)
{
const v3_result res = notify_state(attrs);

#if DPF_VST3_USES_SEPARATE_CONTROLLER
if (res != V3_OK)
return res;

// notify component of the change
DISTRHO_SAFE_ASSERT_RETURN(fConnectionFromCompToCtrl != nullptr, V3_INTERNAL_ERR);
return v3_cpp_obj(fConnectionFromCompToCtrl)->notify(fConnectionFromCompToCtrl, message);
#else
return notify_state(attrs);
return res;
#endif
}
#endif


+ 2
- 2
distrho/src/DistrhoUIVST3.cpp View File

@@ -160,8 +160,8 @@ public:
);

char suffix[9];
std::snprintf(suffix, 8, "%08x", std::rand());
suffix[8] = '\0';
std::snprintf(suffix, sizeof(suffix), "%08x", std::rand());
suffix[sizeof(suffix)-1] = '\0';
fTimerWindowClassName += suffix;

WNDCLASSEX cls;


Loading…
Cancel
Save