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

Added support for building Unity native audio plugins on desktop platforms

This commit is contained in:
ed 2018-05-10 16:32:30 +01:00
parent 30f6206be9
commit 527625b699
32 changed files with 1599 additions and 53 deletions

View file

@ -31,6 +31,10 @@ CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr;
typedef void (*SettingChangeCallbackFunc) (void);
SettingChangeCallbackFunc settingChangeCallback = nullptr;
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_Unity
bool juce_isRunningInUnity();
#endif
//==============================================================================
namespace WindowsMessageHelpers
{
@ -168,6 +172,12 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend
bool MessageManager::postMessageToSystemQueue (MessageManager::MessageBase* const message)
{
message->incReferenceCount();
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_Unity
if (juce_isRunningInUnity())
return SendNotifyMessage (juce_messageWindowHandle, WindowsMessageHelpers::customMessageID, 0, (LPARAM) message) != 0;
else
#endif
return PostMessage (juce_messageWindowHandle, WindowsMessageHelpers::customMessageID, 0, (LPARAM) message) != 0;
}