summaryrefslogtreecommitdiff
path: root/gtk2_ardour/video_server_dialog.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-11-23 23:55:41 +0100
committerRobin Gareus <robin@gareus.org>2014-11-23 23:57:55 +0100
commit1b6cbf743bb497915afc0b3bb11f06311d0a08fb (patch)
tree287e6c0d84a693078b22ef06b31e5d2ae69ed3bb /gtk2_ardour/video_server_dialog.cc
parent8ddeb712f6ebfcbfdec0eb947e9499414951a03e (diff)
update harvid & ffmpeg binary path discovery on windows (64 & 32 bit)
Diffstat (limited to 'gtk2_ardour/video_server_dialog.cc')
-rw-r--r--gtk2_ardour/video_server_dialog.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk2_ardour/video_server_dialog.cc b/gtk2_ardour/video_server_dialog.cc
index de6af96f04..4b3bf206e4 100644
--- a/gtk2_ardour/video_server_dialog.cc
+++ b/gtk2_ardour/video_server_dialog.cc
@@ -109,11 +109,17 @@ VideoServerDialog::VideoServerDialog (Session* s)
&& (ERROR_SUCCESS == RegQueryValueExA (key, "Install_Dir", 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size))
)
{
- path_entry.set_text(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "harvid.exe", 0));
+ path_entry.set_text(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "harvid.exe", NULL));
}
- else if (program_files && Glib::file_test(g_build_filename(program_files, "harvid", "harvid.exe", 0), Glib::FILE_TEST_EXISTS))
+ else if ( (ERROR_SUCCESS == RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Software\\RSS\\harvid", 0, KEY_READ | KEY_WOW64_32KEY, &key))
+ && (ERROR_SUCCESS == RegQueryValueExA (key, "Install_Dir", 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size))
+ )
+ {
+ path_entry.set_text(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "harvid.exe", NULL));
+ }
+ else if (program_files && Glib::file_test(g_build_filename(program_files, "harvid", "harvid.exe", NULL), Glib::FILE_TEST_EXISTS))
{
- path_entry.set_text(g_build_filename(program_files, "harvid", "harvid.exe", 0));
+ path_entry.set_text(g_build_filename(program_files, "harvid", "harvid.exe", NULL));
}
#endif
/* generic fallbacks to try */