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();
|
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);
|
pm.PurgeType(VSTPLUGINTYPE);
|
||||||
gPrefs->Write(wxT("/VST/Rescan"), false);
|
gPrefs->Write(wxT("/VST/Rescan"), false);
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
|
bScanRequired = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pm.HasType(VSTPLUGINTYPE)) {
|
if (!pm.HasType(VSTPLUGINTYPE)) {
|
||||||
|
// rescan.
|
||||||
pm.Close();
|
pm.Close();
|
||||||
VSTEffect::Scan();
|
if( bScanRequired)
|
||||||
|
VSTEffect::Scan();
|
||||||
pm.Open();
|
pm.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EffectManager & em = EffectManager::Get();
|
EffectManager & em = EffectManager::Get();
|
||||||
|
|
||||||
wxString path = pm.GetFirstPlugin(VSTPLUGINTYPE);
|
wxString path = pm.GetFirstPlugin(VSTPLUGINTYPE);
|
||||||
|
|||||||
Reference in New Issue
Block a user