diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index edc9d9f2a7..a6644b8a69 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -1807,17 +1807,14 @@ PluginManager::run_vst3_scanner_app (std::string bundle_path) const int timeout = Config->get_vst_scan_timeout(); // deciseconds bool notime = (timeout <= 0); - ARDOUR::PluginScanTimeout (timeout); while (scanner.is_running () && (notime || timeout > 0)) { - - if (!notime && !no_timeout ()) { - if (timeout % 5 == 0) { - ARDOUR::PluginScanTimeout (timeout); - } - --timeout; + if (!notime && no_timeout ()) { + notime = true; + timeout = -1; } - ARDOUR::GUIIdle (); + ARDOUR::PluginScanTimeout (timeout); + --timeout; Glib::usleep (100000); if (cancelled () || (!notime && timeout == 0)) { diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc index 7106608735..74e6cee4f7 100644 --- a/libs/ardour/vst_info_file.cc +++ b/libs/ardour/vst_info_file.cc @@ -1006,18 +1006,17 @@ vstfx_get_info (const char* dllpath, enum ARDOUR::PluginType type, enum VSTScanM } else { int timeout = PLUGIN_SCAN_TIMEOUT; bool no_timeout = (timeout <= 0); - ARDOUR::PluginScanTimeout (timeout); while (scanner.is_running () && (no_timeout || timeout > 0)) { - if (!no_timeout && !ARDOUR::PluginManager::instance ().no_timeout ()) { - if (timeout%5 == 0) { - ARDOUR::PluginScanTimeout (timeout); - } - --timeout; + if (!no_timeout && ARDOUR::PluginManager::instance().no_timeout()) { + no_timeout = true; + timeout = -1; } - ARDOUR::GUIIdle (); + + ARDOUR::PluginScanTimeout (timeout); + --timeout; Glib::usleep (100000); - if (ARDOUR::PluginManager::instance ().cancelled ()) { + if (ARDOUR::PluginManager::instance ().cancelled () /*|| (!no_timeout && timeout == 0*)*/) { // remove info file (might be incomplete) vstfx_remove_infofile (dllpath); // remove temporary blacklist file (scan incomplete)