Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:bespokesynth
bespokesynth-nightly
add-no-hash-lookup-for-plugin.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File add-no-hash-lookup-for-plugin.patch of Package bespokesynth-nightly
diff --git a/Source/VSTPlugin.cpp b/Source/VSTPlugin.cpp index b4800f78..e8af23c1 100644 --- a/Source/VSTPlugin.cpp +++ b/Source/VSTPlugin.cpp @@ -180,9 +180,33 @@ namespace VSTLookup return ""; } + juce::String cutOffIdHash(juce::String inputString) + { + + // Split the string based on '-' + juce::StringArray parts; + parts.addTokens(inputString, "-", ""); + + // Check if there are at least two parts + if (parts.size() >= 2) + { + // Remove the second part from the right + parts.remove(parts.size() - 2); + + // Join the remaining parts back into a string + juce::String result = parts.joinIntoString("-"); + + // Output the result + return result; + } + return inputString; + } + bool GetPluginDesc(juce::PluginDescription& desc, juce::String pluginId) { auto types = TheSynth->GetKnownPluginList().getTypes(); + auto cutId = cutOffIdHash(pluginId); + for (int i = 0; i < types.size(); ++i) { if (types[i].createIdentifierString() == pluginId) @@ -191,6 +215,15 @@ namespace VSTLookup return true; } } + + for (int i = 0; i < types.size(); ++i) + { + if (cutOffIdHash(types[i].createIdentifierString()) == cutId) + { + desc = types[i]; + return true; + } + } return false; } diff --git a/Source/VSTPlugin.h b/Source/VSTPlugin.h index 1dea5bd7..6044db84 100644 --- a/Source/VSTPlugin.h +++ b/Source/VSTPlugin.h @@ -148,6 +148,7 @@ private: juce::MidiBuffer mFutureMidiBuffer; juce::CriticalSection mMidiInputLock; std::atomic<bool> mRescanParameterNames{ false }; + juce::String cutOffIdHash(juce::String); int mNumInputChannels{ 2 }; int mNumOutputChannels{ 2 };
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor