mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-15 16:17: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__)
|
#elif defined(__WXMSW__)
|
||||||
TCHAR dpath[MAX_PATH];
|
TCHAR dpath[MAX_PATH];
|
||||||
TCHAR tpath[MAX_PATH];
|
TCHAR tpath[MAX_PATH];
|
||||||
DWORD len = WXSIZEOF(tpath);
|
DWORD len;
|
||||||
|
|
||||||
// Setup the default VST path.
|
// Try HKEY_CURRENT_USER registry key first
|
||||||
dpath[0] = '\0';
|
len = sizeof(tpath) / sizeof(TCHAR);
|
||||||
ExpandEnvironmentStrings(wxT("%ProgramFiles%\\Steinberg\\VSTPlugins"),
|
|
||||||
dpath,
|
|
||||||
WXSIZEOF(dpath));
|
|
||||||
|
|
||||||
// Check registry for the real path
|
|
||||||
if (SHRegGetUSValue(wxT("Software\\VST"),
|
if (SHRegGetUSValue(wxT("Software\\VST"),
|
||||||
wxT("VSTPluginsPath"),
|
wxT("VSTPluginsPath"),
|
||||||
NULL,
|
NULL,
|
||||||
tpath,
|
tpath,
|
||||||
&len,
|
&len,
|
||||||
FALSE,
|
FALSE,
|
||||||
dpath,
|
NULL,
|
||||||
(DWORD) _tcslen(dpath)) == ERROR_SUCCESS) {
|
0) == ERROR_SUCCESS) {
|
||||||
tpath[len] = 0;
|
tpath[len] = 0;
|
||||||
|
dpath[0] = 0;
|
||||||
ExpandEnvironmentStrings(tpath, dpath, WXSIZEOF(dpath));
|
ExpandEnvironmentStrings(tpath, dpath, WXSIZEOF(dpath));
|
||||||
wxGetApp().AddUniquePathToPathList(LAT1CTOWX(dpath), pathList);
|
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
|
// Recursively scan for all DLLs
|
||||||
wxGetApp().FindFilesInPathList(wxT("*.dll"), pathList, files, wxDIR_DEFAULT);
|
wxGetApp().FindFilesInPathList(wxT("*.dll"), pathList, files, wxDIR_DEFAULT);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user