File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3441,14 +3441,15 @@ std::vector<UWPMidiClass::port> UWPMidiClass::list_ports(winrt::hstring device_s
3441
3441
return retval;
3442
3442
}
3443
3443
3444
- // Fix MIDI OUT port names starting with `MIDI` to MIDI IN port names with similar ID strings
3444
+ // Fix MIDI OUT port names starting with `MIDI` or `2 - MIDI` to MIDI IN port names with similar ID strings
3445
3445
void UWPMidiClass::fix_display_name (const std::vector<port>& in_ports,
3446
3446
std::vector<port>& out_ports)
3447
3447
{
3448
3448
for (auto & outp : out_ports)
3449
3449
{
3450
- if (outp.hex_id .empty () ||
3451
- std::string_view{ outp.name }.substr (0 , 4 ) != " MIDI" )
3450
+ if (outp.hex_id .empty ())
3451
+ continue ;
3452
+ if (std::string_view{ outp.name }.substr (0 , 4 ) != " MIDI" && std::string_view{ outp.name }.substr (1 , 7 ) != " - MIDI" )
3452
3453
continue ;
3453
3454
3454
3455
for (const auto & inp : in_ports)
You can’t perform that action at this time.
0 commit comments