Skip to content

Commit

Permalink
deck: print dev numeric indices in fullhelp
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Jun 12, 2024
1 parent 80e9d01 commit 342c42c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/video_capture/decklink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,16 @@ decklink_help(bool full, const char *query_prop_fcc = nullptr)
deviceName = "(unable to get name)";
}

char numeric_index[STR_LEN] = "";
if (full) {
snprintf(numeric_index, sizeof numeric_index,
TBOLD("%d") ") ", get<int>(d));
}
// *** Print the model name of the DeckLink card
color_printf("\t" TBOLD("%c") ") " TBOLD("%6x") ") " TBOLD(
TGREEN("%s")) "\n",
get<char>(d), get<unsigned>(d), deviceName.c_str());
color_printf("\t" TBOLD("%c") ") %s" TBOLD("%6x") ") " TBOLD(
TGREEN("%s")) "\n",
get<char>(d), numeric_index, get<unsigned>(d),
deviceName.c_str());

// Increment the total number of DeckLink cards found
numDevices++;
Expand Down
9 changes: 7 additions & 2 deletions src/video_display/decklink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,15 @@ show_help(bool full, const char *query_prop_fcc = nullptr)
deviceName = "(unable to get name)";
}

char numeric_index[STR_LEN] = "";
if (full) {
snprintf(numeric_index, sizeof numeric_index,
TBOLD("%d") ") ", get<int>(d));
}
// *** Print the model name of the DeckLink card
color_printf("\t" TBOLD("%c") ") " TBOLD("%6x") ") " TBOLD(
color_printf("\t" TBOLD("%c") ") %s" TBOLD("%6x") ") " TBOLD(
TGREEN("%s")) "\n",
get<char>(d), get<unsigned>(d),
get<char>(d), numeric_index, get<unsigned>(d),
deviceName.c_str());
if (full) {
print_output_modes(deckLink, query_prop_fcc);
Expand Down

0 comments on commit 342c42c

Please sign in to comment.