Skip to content

Commit 24fae3e

Browse files
committed
delta_get_board_type_name: use VHD fn
With VHD 6.3x and above, use VHD_BOARDTYPE_ToPrettyString() to support also new types without having to manually manage the list, eg.: - VHD_BOARDTYPE_MIXEDINTERFACE - VHD_BOARDTYPE_FLEX_DEPRECATED - VHD_BOARDTYPE_ASI - VHD_BOARDTYPE_IP - VHD_BOARDTYPE_HDMI20 - VHD_BOARDTYPE_FLEX_DP - VHD_BOARDTYPE_FLEX_SDI - VHD_BOARDTYPE_12G - VHD_BOARDTYPE_FLEX_HMI
1 parent 0fe1f43 commit 24fae3e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/deltacast_common.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,12 @@ delta_single_to_quad_links_interface(ULONG RXStatus, ULONG *pInterface,
808808
const char *
809809
delta_get_board_type_name(ULONG BoardType)
810810
{
811+
#ifdef HAVE_VHD_STRING
812+
thread_local char buf[128];
813+
snprintf_ch(buf, "%s type",
814+
VHD_BOARDTYPE_ToPrettyString((VHD_BOARDTYPE) BoardType));
815+
return buf;
816+
#else
811817
static const std::unordered_map<ULONG, std::string> board_type_map = {
812818
{ VHD_BOARDTYPE_HD, "HD board type" },
813819
{ VHD_BOARDTYPE_HDKEY, "HD key board type" },
@@ -824,4 +830,5 @@ delta_get_board_type_name(ULONG BoardType)
824830
return it->second.c_str();
825831
}
826832
return "Unknown DELTACAST type";
833+
#endif
827834
}

0 commit comments

Comments
 (0)