mirror of
https://github.com/holub/mame
synced 2025-05-21 05:08:54 +03:00
(MESS) osdcore: Allow "default" for -midiin and -midiout. [R. Belmont]
This commit is contained in:
parent
931ae57120
commit
90c4bfb799
@ -232,16 +232,23 @@ osd_midi_device *osd_open_midi_input(const char *devname)
|
|||||||
PortMidiStream *stm;
|
PortMidiStream *stm;
|
||||||
osd_midi_device *ret;
|
osd_midi_device *ret;
|
||||||
|
|
||||||
for (int i = 0; i < num_devs; i++)
|
if (!strcmp("default", devname))
|
||||||
{
|
{
|
||||||
pmInfo = Pm_GetDeviceInfo(i);
|
found_dev = Pm_GetDefaultInputDeviceID();
|
||||||
|
}
|
||||||
if (pmInfo->input)
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < num_devs; i++)
|
||||||
{
|
{
|
||||||
if (!strcmp(devname, pmInfo->name))
|
pmInfo = Pm_GetDeviceInfo(i);
|
||||||
|
|
||||||
|
if (pmInfo->input)
|
||||||
{
|
{
|
||||||
found_dev = i;
|
if (!strcmp(devname, pmInfo->name))
|
||||||
break;
|
{
|
||||||
|
found_dev = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -279,16 +286,23 @@ osd_midi_device *osd_open_midi_output(const char *devname)
|
|||||||
PortMidiStream *stm;
|
PortMidiStream *stm;
|
||||||
osd_midi_device *ret;
|
osd_midi_device *ret;
|
||||||
|
|
||||||
for (int i = 0; i < num_devs; i++)
|
if (!strcmp("default", devname))
|
||||||
{
|
{
|
||||||
pmInfo = Pm_GetDeviceInfo(i);
|
found_dev = Pm_GetDefaultOutputDeviceID();
|
||||||
|
}
|
||||||
if (pmInfo->output)
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < num_devs; i++)
|
||||||
{
|
{
|
||||||
if (!strcmp(devname, pmInfo->name))
|
pmInfo = Pm_GetDeviceInfo(i);
|
||||||
|
|
||||||
|
if (pmInfo->output)
|
||||||
{
|
{
|
||||||
found_dev = i;
|
if (!strcmp(devname, pmInfo->name))
|
||||||
break;
|
{
|
||||||
|
found_dev = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user