Skip to content

Commit

Permalink
Also fix names of UWP output devices when there's two or more of the …
Browse files Browse the repository at this point in the history
…same kind attached.
  • Loading branch information
sagamusix committed Sep 11, 2023
1 parent 1e5b499 commit e730349
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3447,8 +3447,9 @@ void UWPMidiClass::fix_display_name(const std::vector<port>& in_ports,
{
for (auto& outp : out_ports)
{
if (outp.hex_id.empty() ||
std::string_view{ outp.name }.substr(0, 4) != "MIDI")
if (outp.hex_id.empty())
continue;
if (std::string_view{ outp.name }.substr(0, 4) != "MIDI" && std::string_view{ outp.name }.substr(1, 7) != " - MIDI")
continue;

for (const auto& inp : in_ports)
Expand Down

0 comments on commit e730349

Please sign in to comment.