try VST2.4's VSTPluginMain first
This fixes a crash with loading u-he Diva on windows.
This commit is contained in:
parent
cd5a319e48
commit
cc72cff504
@ -219,12 +219,10 @@ vstfx_load (const char *path)
|
|||||||
|
|
||||||
/*Find the main entry point into the plugin*/
|
/*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 == 0) {
|
||||||
if ((fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "VSTPluginMain")) != 0) {
|
fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "main");
|
||||||
PBD::warning << path << _(": is a VST >= 2.4 - this plugin may or may not function correctly with this version of Ardour.") << endmsg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fhandle->main_entry == 0)
|
if (fhandle->main_entry == 0)
|
||||||
|
@ -477,13 +477,10 @@ fst_load (const char *path)
|
|||||||
return NULL;
|
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 == 0) {
|
||||||
if ((fhandle->main_entry = (main_entry_t) GetProcAddress ((HMODULE)fhandle->dll, "VSTPluginMain"))) {
|
fhandle->main_entry = (main_entry_t) GetProcAddress ((HMODULE)fhandle->dll, "main");
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fhandle->main_entry == 0) {
|
if (fhandle->main_entry == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user