From bb468ee4dee8932f67248cf164249e9bde1d464c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 9 Nov 2020 20:06:49 +0100 Subject: [PATCH] Update jackd.exe registry key This ensures compatibility with upcoming jack > 1.9.16, current jack 1.9.16, as well as older versions. --- libs/backends/jack/jack_utils.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/backends/jack/jack_utils.cc b/libs/backends/jack/jack_utils.cc index f7d75a4a79..8dd0d1393e 100644 --- a/libs/backends/jack/jack_utils.cc +++ b/libs/backends/jack/jack_utils.cc @@ -556,7 +556,16 @@ ARDOUR::get_jack_server_dir_paths (vector& server_dir_paths) #ifdef PLATFORM_WINDOWS std::string reg; - bool found = PBD::windows_query_registry ("Software\\JACK", "Location", reg); + /* since https://github.com/jackaudio/jack2/commit/ac62faa9c0268b89e3ea23c0318227612acd8079 */ + bool found = PBD::windows_query_registry ("Software\\JACK", "InstallPath", reg); + + if (!found) { + /* special-case jack 1.9.16, "Location" included jackd.exe */ + found = PBD::windows_query_registry ("Software\\JACK", "Location", reg); + if (found) { + reg = Glib::path_get_dirname (reg); + } + } if (!found) { // If the newer style regkey wasn't found, check for one in the older style... found = PBD::windows_query_registry ("Software\\Jack", "InstPath", reg, HKEY_CURRENT_USER);