1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Unity: Ensure that the MessageManager is always initialised before new plug-in instances are created

This commit is contained in:
ed 2018-11-08 12:23:12 +00:00
parent 4380b0e4a2
commit cda5c144f4

View file

@ -668,12 +668,13 @@ static void declareEffect (UnityAudioEffectDefinition& definition)
UNITY_INTERFACE_EXPORT int UnityGetAudioEffectDefinitions (UnityAudioEffectDefinition*** definitionsPtr)
{
if (juce::getWrapperMap().size() == 0)
juce::initialiseJuce_GUI();
static bool hasInitialised = false;
if (! hasInitialised)
{
juce::initialiseJuce_GUI();
juce::PluginHostType::jucePlugInClientCurrentWrapperType = juce::AudioProcessor::wrapperType_Unity;
juce::juce_createUnityPeerFn = juce::createUnityPeer;