@@ -51,14 +51,10 @@ | |||||
#include "AAX_IViewContainer.h" | #include "AAX_IViewContainer.h" | ||||
#if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||
static HINSTANCE moduleInstance = 0; | |||||
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD selector, LPVOID) | |||||
void __stdcall DllMainAAX (HINSTANCE instance, DWORD reason) | |||||
{ | { | ||||
if (selector == DLL_PROCESS_ATTACH) | |||||
moduleInstance = instance; | |||||
return true; | |||||
if (reason == DLL_PROCESS_ATTACH) | |||||
Process::setCurrentModuleInstanceHandle (instance); | |||||
} | } | ||||
#endif | #endif | ||||
@@ -140,10 +136,6 @@ struct AAXClasses | |||||
private: | private: | ||||
static void initialise() | static void initialise() | ||||
{ | { | ||||
#if JUCE_WINDOWS | |||||
Process::setCurrentModuleInstanceHandle (moduleInstance); | |||||
#endif | |||||
initialiseJuce_GUI(); | initialiseJuce_GUI(); | ||||
} | } | ||||
@@ -31,9 +31,9 @@ | |||||
#if JucePlugin_Build_RTAS | #if JucePlugin_Build_RTAS | ||||
#include "juce_RTAS_DigiCode_Header.h" | |||||
#include "juce_RTAS_DigiCode_Header.h" | |||||
/* | |||||
/* | |||||
This file is used to include and build the required digidesign CPP files without your project | This file is used to include and build the required digidesign CPP files without your project | ||||
needing to reference the files directly. Because these files will be found via your include path, | needing to reference the files directly. Because these files will be found via your include path, | ||||
this means that the project doesn't have to change to cope with people's SDKs being in different | this means that the project doesn't have to change to cope with people's SDKs being in different | ||||
@@ -46,47 +46,63 @@ | |||||
If you get an error building the includes statements below, check your paths - there's a full | If you get an error building the includes statements below, check your paths - there's a full | ||||
list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp | list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp | ||||
*/ | |||||
#if WINDOWS_VERSION | |||||
//============================================================================== | |||||
*/ | |||||
#undef _UNICODE | |||||
#undef UNICODE | |||||
#if JucePlugin_Build_VST | |||||
#if WINDOWS_VERSION | |||||
#undef _UNICODE | |||||
#undef UNICODE | |||||
#define DllMain DllMainRTAS | #define DllMain DllMainRTAS | ||||
#include <DLLMain.cpp> | #include <DLLMain.cpp> | ||||
#undef DllMain | #undef DllMain | ||||
#include <DefaultSwap.cpp> | |||||
extern BOOL WINAPI DllMainVST (HINSTANCE instance, DWORD dwReason, LPVOID); | |||||
// This overloaded DllMain can work as either an RTAS or a VST.. | |||||
extern "C" BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD ul_reason_for_call, LPVOID lpReserved) | |||||
{ | |||||
if (GetModuleHandleA ("DAE.DLL") != 0) | |||||
return DllMainRTAS (hInstance, ul_reason_for_call, lpReserved); | |||||
else | |||||
return DllMainVST (hInstance, ul_reason_for_call, lpReserved); | |||||
} | |||||
#else | #else | ||||
#include <DLLMain.cpp> | |||||
#include <PlugInInitialize.cpp> | |||||
#include <Dispatcher.cpp> | |||||
#endif | #endif | ||||
#include <DefaultSwap.cpp> | |||||
#else | |||||
#if _MSC_VER | |||||
short __stdcall NewPlugIn (void*) { return 0; } | |||||
short __stdcall _PI_GetRoutineDescriptor (long, void*) { return 0; } | |||||
#endif | |||||
#else | |||||
//============================================================================== | |||||
#include <PlugInInitialize.cpp> | |||||
#include <Dispatcher.cpp> | |||||
#endif | #endif | ||||
#else | |||||
//============================================================================== | |||||
#if _MSC_VER | #if _MSC_VER | ||||
short __stdcall NewPlugIn (void*) { return 0; } | |||||
short __stdcall _PI_GetRoutineDescriptor (long, void*) { return 0; } | |||||
#endif | |||||
#if ! JucePlugin_Build_RTAS | |||||
#include <windows.h> | |||||
#endif | |||||
#if JucePlugin_Build_VST | |||||
extern void __stdcall DllMainVST (HINSTANCE, DWORD); | |||||
#endif | |||||
#if JucePlugin_Build_AAX | |||||
extern void __stdcall DllMainAAX (HINSTANCE, DWORD); | |||||
#endif | |||||
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, LPVOID reserved) | |||||
{ | |||||
(void) reserved; | |||||
#if JucePlugin_Build_VST | |||||
DllMainVST (instance, reason); | |||||
#endif | |||||
#if JucePlugin_Build_AAX | |||||
DllMainAAX (instance, reason); | |||||
#endif | |||||
#if JucePlugin_Build_RTAS | |||||
if (GetModuleHandleA ("DAE.DLL") != 0) | |||||
return DllMainRTAS (instance, reason, reserved); | |||||
#endif | |||||
return TRUE; | |||||
} | |||||
#endif | #endif |
@@ -1477,19 +1477,23 @@ namespace | |||||
} | } | ||||
} | } | ||||
#if ! JUCE_WINDOWS | |||||
#define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility("default"))) | |||||
#endif | |||||
//============================================================================== | //============================================================================== | ||||
// Mac startup code.. | // Mac startup code.. | ||||
#if JUCE_MAC | #if JUCE_MAC | ||||
extern "C" __attribute__ ((visibility("default"))) AEffect* VSTPluginMain (audioMasterCallback audioMaster); | |||||
extern "C" __attribute__ ((visibility("default"))) AEffect* VSTPluginMain (audioMasterCallback audioMaster) | |||||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster); | |||||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster) | |||||
{ | { | ||||
initialiseMac(); | initialiseMac(); | ||||
return pluginEntryPoint (audioMaster); | return pluginEntryPoint (audioMaster); | ||||
} | } | ||||
extern "C" __attribute__ ((visibility("default"))) AEffect* main_macho (audioMasterCallback audioMaster); | |||||
extern "C" __attribute__ ((visibility("default"))) AEffect* main_macho (audioMasterCallback audioMaster) | |||||
JUCE_EXPORTED_FUNCTION AEffect* main_macho (audioMasterCallback audioMaster); | |||||
JUCE_EXPORTED_FUNCTION AEffect* main_macho (audioMasterCallback audioMaster) | |||||
{ | { | ||||
initialiseMac(); | initialiseMac(); | ||||
return pluginEntryPoint (audioMaster); | return pluginEntryPoint (audioMaster); | ||||
@@ -1499,15 +1503,15 @@ namespace | |||||
// Linux startup code.. | // Linux startup code.. | ||||
#elif JUCE_LINUX | #elif JUCE_LINUX | ||||
extern "C" __attribute__ ((visibility("default"))) AEffect* VSTPluginMain (audioMasterCallback audioMaster) | |||||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster); | |||||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster) | |||||
{ | { | ||||
SharedMessageThread::getInstance(); | SharedMessageThread::getInstance(); | ||||
return pluginEntryPoint (audioMaster); | return pluginEntryPoint (audioMaster); | ||||
} | } | ||||
extern "C" __attribute__ ((visibility("default"))) AEffect* main_plugin (audioMasterCallback audioMaster) asm ("main"); | |||||
extern "C" __attribute__ ((visibility("default"))) AEffect* main_plugin (audioMasterCallback audioMaster) | |||||
JUCE_EXPORTED_FUNCTION AEffect* main_plugin (audioMasterCallback audioMaster) asm ("main"); | |||||
JUCE_EXPORTED_FUNCTION AEffect* main_plugin (audioMasterCallback audioMaster) | |||||
{ | { | ||||
return VSTPluginMain (audioMaster); | return VSTPluginMain (audioMaster); | ||||
} | } | ||||
@@ -1532,16 +1536,10 @@ namespace | |||||
} | } | ||||
#endif | #endif | ||||
#if JucePlugin_Build_RTAS | |||||
BOOL WINAPI DllMainVST (HINSTANCE instance, DWORD dwReason, LPVOID) | |||||
#else | |||||
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD dwReason, LPVOID) | |||||
#endif | |||||
void __stdcall DllMainVST (HINSTANCE instance, DWORD reason) | |||||
{ | { | ||||
if (dwReason == DLL_PROCESS_ATTACH) | |||||
if (reason == DLL_PROCESS_ATTACH) | |||||
Process::setCurrentModuleInstanceHandle (instance); | Process::setCurrentModuleInstanceHandle (instance); | ||||
return TRUE; | |||||
} | } | ||||
#endif | #endif | ||||
@@ -38,6 +38,9 @@ struct CustomMouseCursorInfo | |||||
Image image; | Image image; | ||||
const Point<int> hotspot; | const Point<int> hotspot; | ||||
float scaleFactor; | float scaleFactor; | ||||
private: | |||||
JUCE_DECLARE_NON_COPYABLE (CustomMouseCursorInfo); | |||||
}; | }; | ||||
class MouseCursor::SharedCursorHandle | class MouseCursor::SharedCursorHandle | ||||