diff --git a/common/metadata-helper.cpp b/common/metadata-helper.cpp index dbe55e992e..d590ea55bc 100644 --- a/common/metadata-helper.cpp +++ b/common/metadata-helper.cpp @@ -69,7 +69,7 @@ namespace rs2 } static void foreach_device_path(const std::vector& devices, - std::function action) { std::map> guid_to_devices; @@ -243,7 +243,7 @@ namespace rs2 device_id did; if (parse_device_id(id, &did)) - foreach_device_path({ did }, [&res, did](device_id&, std::wstring path) { + foreach_device_path({ did }, [&res, did](const device_id&, std::wstring path) { HKEY key; if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path.c_str(), 0, KEY_READ | KEY_WOW64_64KEY, &key) == ERROR_SUCCESS) @@ -307,7 +307,7 @@ namespace rs2 } bool failure = false; - foreach_device_path(dids, [&failure](device_id& did, std::wstring path) { + foreach_device_path(dids, [&failure](const device_id& did, std::wstring path) { HKEY key; if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path.c_str(), 0, KEY_WRITE | KEY_WOW64_64KEY, &key) == ERROR_SUCCESS) { diff --git a/common/metadata-helper.h b/common/metadata-helper.h index 15e858952a..af0f6b1c03 100644 --- a/common/metadata-helper.h +++ b/common/metadata-helper.h @@ -13,9 +13,11 @@ namespace rs2 // Check if metadata is enabled using Physical Port ID // (can be retrieved with device::get_info(RS2_CAMERA_INFO_PHYSICAL_PORT)) + // throws runtime_error in case of errors virtual bool is_enabled(std::string id) const { return true; } // Enable metadata for all connected devices + // throws runtime_error in case of errors virtual void enable_metadata() { } static bool can_support_metadata(const std::string& product) diff --git a/common/notifications.cpp b/common/notifications.cpp index 0f96cd0d79..7f51373da4 100644 --- a/common/notifications.cpp +++ b/common/notifications.cpp @@ -1033,7 +1033,7 @@ namespace rs2 if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("%s", "You will be prompted to enabled metadata on the device"); + ImGui::SetTooltip("%s", "Enables metadata on connected devices (you may be prompted for administrator privileges)"); } } } diff --git a/common/windows-app-bootstrap.cpp b/common/windows-app-bootstrap.cpp index 6191c2fdec..1805605de2 100644 --- a/common/windows-app-bootstrap.cpp +++ b/common/windows-app-bootstrap.cpp @@ -37,7 +37,6 @@ int CALLBACK WinMain( { try { - DebugBreak(); rs2::metadata_helper::instance().enable_metadata(); exit(0); }