Commit f63208ec authored by Brandon Invergo's avatar Brandon Invergo

Allow opening a MIDI seq even if the device isn't recognized

by ALSA
parent 379cf87e
......@@ -58,6 +58,7 @@ grab_alsa_ctl (lk_device_t *device, const char *controller_name)
}
device->ctl_handle = NULL;
strncpy (device->str_id, controller_name, 63);
device->str_id[63] = '\0';
err = get_device_id (device, controller_name);
if (err < 0)
{
......@@ -223,14 +224,11 @@ open_device (lk_device_t *device, const char *controller_name,
{
return err;
}
if (open_midi_seq)
{
err = grab_alsa_seq (device, controller_name);
if (err < 0)
{
return err;
}
}
}
else
{
strncpy (device->str_id, input_name, 63);
device->str_id[63] = '\0';
}
if (input_name)
{
......@@ -240,6 +238,21 @@ open_device (lk_device_t *device, const char *controller_name,
grab_remap_dev (device, input_name);
}
}
if (open_midi_seq)
{
if (controller_name)
{
err = grab_alsa_seq (device, controller_name);
}
else
{
err = grab_alsa_seq (device, input_name);
}
if (err < 0)
{
return err;
}
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment