From: Robin Gareus Date: Thu, 17 Nov 2016 12:03:36 +0000 (+0100) Subject: try VST2.4's VSTPluginMain first X-Git-Tag: 5.5~125 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=cc72cff504bc16c97a75c58d758a74d3b9436edd;hp=cd5a319e4842862fa6e84f35e3781fce73e129cf;p=ardour.git try VST2.4's VSTPluginMain first This fixes a crash with loading u-he Diva on windows. --- diff --git a/libs/ardour/linux_vst_support.cc b/libs/ardour/linux_vst_support.cc index 065e8bd755..be16340f2a 100644 --- a/libs/ardour/linux_vst_support.cc +++ b/libs/ardour/linux_vst_support.cc @@ -219,12 +219,10 @@ vstfx_load (const char *path) /*Find the main entry point into the plugin*/ - fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "main"); + fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "VSTPluginMain"); if (fhandle->main_entry == 0) { - if ((fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "VSTPluginMain")) != 0) { - PBD::warning << path << _(": is a VST >= 2.4 - this plugin may or may not function correctly with this version of Ardour.") << endmsg; - } + fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "main"); } if (fhandle->main_entry == 0) diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index fcfa836893..ec2f290cce 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -477,13 +477,10 @@ fst_load (const char *path) return NULL; } - fhandle->main_entry = (main_entry_t) GetProcAddress ((HMODULE)fhandle->dll, "main"); + fhandle->main_entry = (main_entry_t) GetProcAddress ((HMODULE)fhandle->dll, "VSTPluginMain"); if (fhandle->main_entry == 0) { - if ((fhandle->main_entry = (main_entry_t) GetProcAddress ((HMODULE)fhandle->dll, "VSTPluginMain"))) { - fprintf(stderr, "VST >= 2.4 plugin '%s'\n", path); - //PBD::warning << path << _(": is a VST >= 2.4 - this plugin may or may not function correctly with this version of Ardour.") << endmsg; - } + fhandle->main_entry = (main_entry_t) GetProcAddress ((HMODULE)fhandle->dll, "main"); } if (fhandle->main_entry == 0) {