mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-15 08:07:41 +02:00
Correct bug 142
This changes the way Audacity searches for VST plugins on Windows. Searching now follows the order specified here: http://wiki.audacityteam.org/index.php?title=VST_Plug-ins#Where_Audacity_looks_for_VST_plug-ins
This commit is contained in:
parent
ca932f45d8
commit
a2a87bb373
@ -1718,28 +1718,47 @@ void VSTEffect::Scan()
|
||||
#elif defined(__WXMSW__)
|
||||
TCHAR dpath[MAX_PATH];
|
||||
TCHAR tpath[MAX_PATH];
|
||||
DWORD len = WXSIZEOF(tpath);
|
||||
DWORD len;
|
||||
|
||||
// Setup the default VST path.
|
||||
dpath[0] = '\0';
|
||||
ExpandEnvironmentStrings(wxT("%ProgramFiles%\\Steinberg\\VSTPlugins"),
|
||||
dpath,
|
||||
WXSIZEOF(dpath));
|
||||
|
||||
// Check registry for the real path
|
||||
// Try HKEY_CURRENT_USER registry key first
|
||||
len = sizeof(tpath) / sizeof(TCHAR);
|
||||
if (SHRegGetUSValue(wxT("Software\\VST"),
|
||||
wxT("VSTPluginsPath"),
|
||||
NULL,
|
||||
tpath,
|
||||
&len,
|
||||
FALSE,
|
||||
dpath,
|
||||
(DWORD) _tcslen(dpath)) == ERROR_SUCCESS) {
|
||||
wxT("VSTPluginsPath"),
|
||||
NULL,
|
||||
tpath,
|
||||
&len,
|
||||
FALSE,
|
||||
NULL,
|
||||
0) == ERROR_SUCCESS) {
|
||||
tpath[len] = 0;
|
||||
dpath[0] = 0;
|
||||
ExpandEnvironmentStrings(tpath, dpath, WXSIZEOF(dpath));
|
||||
wxGetApp().AddUniquePathToPathList(LAT1CTOWX(dpath), pathList);
|
||||
}
|
||||
|
||||
// Then try HKEY_LOCAL_MACHINE registry key
|
||||
len = sizeof(tpath) / sizeof(TCHAR);
|
||||
if (SHRegGetUSValue(wxT("Software\\VST"),
|
||||
wxT("VSTPluginsPath"),
|
||||
NULL,
|
||||
tpath,
|
||||
&len,
|
||||
TRUE,
|
||||
NULL,
|
||||
0) == ERROR_SUCCESS) {
|
||||
tpath[len] = 0;
|
||||
dpath[0] = 0;
|
||||
ExpandEnvironmentStrings(tpath, dpath, WXSIZEOF(dpath));
|
||||
wxGetApp().AddUniquePathToPathList(LAT1CTOWX(dpath), pathList);
|
||||
}
|
||||
|
||||
// Add the default path last
|
||||
dpath[0] = 0;
|
||||
ExpandEnvironmentStrings(wxT("%ProgramFiles%\\Steinberg\\VSTPlugins"),
|
||||
dpath,
|
||||
WXSIZEOF(dpath));
|
||||
wxGetApp().AddUniquePathToPathList(LAT1CTOWX(dpath), pathList);
|
||||
|
||||
// Recursively scan for all DLLs
|
||||
wxGetApp().FindFilesInPathList(wxT("*.dll"), pathList, files, wxDIR_DEFAULT);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user