win midi: fallback if no devices found

This commit is contained in:
Roman Fomin 2023-10-11 16:20:21 +07:00
parent 51ce2f38f4
commit 51ccc03461

View File

@ -1730,6 +1730,12 @@ static int I_WIN_DeviceList(const char *devices[], int size, int *current_device
GetDevices(); GetDevices();
if (winmm_devices_num == 0 && size > 0)
{
devices[0] = "MIDI Mapper";
return 1;
}
for (i = 0; i < winmm_devices_num && i < size; ++i) for (i = 0; i < winmm_devices_num && i < size; ++i)
{ {
devices[i] = winmm_devices[i]; devices[i] = winmm_devices[i];