diff options
Diffstat (limited to 'WDL/swell/swell.cpp')
| -rw-r--r-- | WDL/swell/swell.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/WDL/swell/swell.cpp b/WDL/swell/swell.cpp index 9e2d2707..5c325df7 100644 --- a/WDL/swell/swell.cpp +++ b/WDL/swell/swell.cpp @@ -36,6 +36,9 @@ #include "swell-internal.h" +#ifdef SWELL_WAYLAND_VST3 +#include "swell-vst3-wayland.h" +#endif #ifndef SWELL_TARGET_OSX #include "swell-platform.h" #endif @@ -931,6 +934,14 @@ void *GetProcAddress(HINSTANCE hInst, const char *procName) #endif if (rec->instptr) ret=(void *)dlsym(rec->instptr, procName); if (ret) rec->lastSymbolRequested=ret; +#ifdef SWELL_WAYLAND_VST3 + if (ret && !strcmp(procName, "GetPluginFactory") && swell_platform_is_wayland() && + dlsym(rec->instptr, "ModuleEntry") && dlsym(rec->instptr, "ModuleExit")) + { + WDL_MutexLock lock(&s_libraryMutex); + return swell_vst3_factory(&rec->vst3_factory, ret); + } +#endif return ret; } @@ -966,6 +977,9 @@ BOOL FreeLibrary(HINSTANCE hInst) CFRelease((CFBundleRef)rec->bundleinstptr); } #endif +#ifdef SWELL_WAYLAND_VST3 + if (dofree) swell_vst3_free_factory(rec->vst3_factory); +#endif if (rec->instptr) dlclose(rec->instptr); if (dofree) free(rec); |
