Skip to content

Commit

Permalink
Add DPF_VST3_DONT_USE_BRAND_ID to fix compat with existing plugins
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Feb 25, 2024
1 parent ca4018b commit bcea4e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion distrho/DistrhoInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,9 @@ START_NAMESPACE_DISTRHO
/**
A 4-character symbol that identifies a brand or manufacturer, with at least one non-lower case character.@n
Plugins from the same brand should use the same symbol.
@note This macro is required when building AU plugins
@note This macro is required when building AU plugins, and used for VST3 if present
@note Setting this macro will change the uid of a VST3 plugin.
If you already released a DPF-based VST3 plugin make sure to also enable DISTRHO_PLUGIN_VST3_OLD_ID_COMPAT
*/
#define DISTRHO_PLUGIN_BRAND_ID Dstr

Expand Down Expand Up @@ -877,6 +879,12 @@ START_NAMESPACE_DISTRHO
*/
#define DPF_VST_SHOW_PARAMETER_OUTPUTS

/**
Forcibly ignore DISTRHO_PLUGIN_BRAND_ID for VST3 plugins.@n
This is required for DPF-based VST3 plugins that got released without setting DISTRHO_PLUGIN_BRAND_ID first.
*/
#define DPF_VST3_DONT_USE_BRAND_ID

/**
Disable all file browser related code.@n
Must be set as compiler macro when building DGL. (e.g. `CXXFLAGS="-DDGL_FILE_BROWSER_DISABLED"`)
Expand Down
2 changes: 1 addition & 1 deletion distrho/src/DistrhoPluginVST3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static constexpr const uint32_t dpf_id_view = d_cconst('v', 'i', 'e', 'w');
// --------------------------------------------------------------------------------------------------------------------
// plugin specific uids (values are filled in during plugin init)

#ifdef DISTRHO_PLUGIN_BRAND_ID
#if defined(DISTRHO_PLUGIN_BRAND_ID) && !defined(DPF_VST3_DONT_USE_BRAND_ID)
static constexpr const uint32_t dpf_id_brand = d_cconst(STRINGIFY(DISTRHO_PLUGIN_BRAND_ID));
#else
static constexpr const uint32_t dpf_id_brand = 0;
Expand Down

0 comments on commit bcea4e0

Please sign in to comment.