launchpad Mini/X: tweak regex to account for weird cases
IRC user MikeLupe reports a Linux/ALSA system that has ports named Launchpad Mini MK3 LPMiniMK3 DA Launchpad Mini MK3 LPMiniMK3 MI (note the truncations). Unclear if this is a failure of some specific version of ALSA or something unusual about his device, but this should fix the situation without breaking for anyone else
This commit is contained in:
parent
07407c4e7c
commit
c628099814
@ -121,9 +121,9 @@ LaunchPadX::probe (std::string& i, std::string& o)
|
||||
}
|
||||
|
||||
#ifdef LAUNCHPAD_MINI
|
||||
std::regex rx (X_("Launchpad Mini.*MIDI"));
|
||||
std::regex rx (X_("Launchpad Mini.*MI"));
|
||||
#else
|
||||
std::regex rx (X_("Launchpad X.*MIDI"));
|
||||
std::regex rx (X_("Launchpad X.*MI"));
|
||||
#endif
|
||||
|
||||
auto has_lppro = [&rx](string const &s) {
|
||||
@ -769,9 +769,9 @@ LaunchPadX::connect_daw_ports ()
|
||||
*/
|
||||
|
||||
#ifdef LAUNCHPAD_MINI
|
||||
std::regex rx (X_("Launchpad Mini.*(DAW|MIDI 1)"), std::regex::extended);
|
||||
std::regex rx (X_("Launchpad Mini.*(DAW|MIDI 1|DA$)"), std::regex::extended);
|
||||
#else
|
||||
std::regex rx (X_("Launchpad X.*(DAW|MIDI 1)"), std::regex::extended);
|
||||
std::regex rx (X_("Launchpad X.*(DAW|MIDI 1|DA$)"), std::regex::extended);
|
||||
#endif
|
||||
|
||||
auto is_dawport = [&rx](string const &s) {
|
||||
|
Loading…
Reference in New Issue
Block a user