mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 23:25:43 +01:00
Add an extra option when querying Windows registry keys
(this option will be needed when 32-bit Ardour is running in 64-bit Windows)
This commit is contained in:
parent
56394b7683
commit
5f082e2c9d
1 changed files with 13 additions and 0 deletions
|
|
@ -71,5 +71,18 @@ PBD::windows_query_registry (const char *regkey, const char *regval, std::string
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef _WIN64
|
||||
// If this is a 32-bit build (but we're running in Win64) the above
|
||||
// code will only search Win32 registry keys. So if we got this far
|
||||
// without finding anything, force Windows to search Win64 keys too
|
||||
if ( (ERROR_SUCCESS == RegOpenKeyExA (root, regkey, 0, KEY_READ | KEY_WOW64_64KEY, &key))
|
||||
&& (ERROR_SUCCESS == RegQueryValueExA (key, regval, 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size))
|
||||
)
|
||||
{
|
||||
rv = Glib::locale_to_utf8 (tmp);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue