mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-17 14:11:13 +01:00
Fix bug where empty plugins.cfg causes a rescan.
This commit is contained in:
@@ -72,18 +72,23 @@ void RegisterVSTEffects()
|
||||
|
||||
pm.Open();
|
||||
|
||||
if (gPrefs->Read(wxT("/VST/Rescan"), (long) false) != false) {
|
||||
bool bScanRequired = false;
|
||||
if (gPrefs->Read(wxT("/VST/Rescan"), (long)true) != false) {
|
||||
pm.PurgeType(VSTPLUGINTYPE);
|
||||
gPrefs->Write(wxT("/VST/Rescan"), false);
|
||||
gPrefs->Flush();
|
||||
bScanRequired = true;
|
||||
}
|
||||
|
||||
if (!pm.HasType(VSTPLUGINTYPE)) {
|
||||
// rescan.
|
||||
pm.Close();
|
||||
VSTEffect::Scan();
|
||||
if( bScanRequired)
|
||||
VSTEffect::Scan();
|
||||
pm.Open();
|
||||
}
|
||||
|
||||
|
||||
EffectManager & em = EffectManager::Get();
|
||||
|
||||
wxString path = pm.GetFirstPlugin(VSTPLUGINTYPE);
|
||||
|
||||
Reference in New Issue
Block a user