Add a fallback logic for VST embedding methods

This commit is contained in:
Hyunin Song
2017-11-20 15:57:29 +09:00
parent 55ce90ec00
commit 72e882af88

View File

@@ -217,8 +217,10 @@ QStringList ConfigManager::availabeVstEmbedMethods()
QString ConfigManager::vstEmbedMethod() const
{
QString defaultMethod = *(availabeVstEmbedMethods().end() - 1);
return value( "ui", "vstembedmethod", defaultMethod );
QStringList methods = availabeVstEmbedMethods();
QString defaultMethod = *(methods.end() - 1);
QString currentMethod = value( "ui", "vstembedmethod", defaultMethod );
return methods.contains(currentMethod) ? currentMethod : defaultMethod;
}
bool ConfigManager::hasWorkingDir() const