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
This commit is contained in:
Martin Pulec
2025-10-30 16:17:36 +01:00
parent 0fe1f43ce4
commit 24fae3ef3d

View File

@@ -808,6 +808,12 @@ delta_single_to_quad_links_interface(ULONG RXStatus, ULONG *pInterface,
const char *
delta_get_board_type_name(ULONG BoardType)
{
#ifdef HAVE_VHD_STRING
thread_local char buf[128];
snprintf_ch(buf, "%s type",
VHD_BOARDTYPE_ToPrettyString((VHD_BOARDTYPE) BoardType));
return buf;
#else
static const std::unordered_map<ULONG, std::string> board_type_map = {
{ VHD_BOARDTYPE_HD, "HD board type" },
{ VHD_BOARDTYPE_HDKEY, "HD key board type" },
@@ -824,4 +830,5 @@ delta_get_board_type_name(ULONG BoardType)
return it->second.c_str();
}
return "Unknown DELTACAST type";
#endif
}