Browse Source

Windows: Add a fallback for win32 MIDI devices that don't support the DRV_QUERYDEVICEINTERFACE message

tags/2021-05-28
ed 6 years ago
parent
commit
c50a50d4f2
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      modules/juce_audio_devices/native/juce_win32_Midi.cpp

+ 7
- 1
modules/juce_audio_devices/native/juce_win32_Midi.cpp View File

@@ -343,7 +343,13 @@ private:
for (int i = 0; i < deviceCaps.size(); ++i)
{
deviceNames.add (deviceCaps[i].szPname);
deviceIDs.add (getInterfaceIDForDevice ((UINT) i));
auto identifier = getInterfaceIDForDevice ((UINT) i);
if (identifier.isNotEmpty())
deviceIDs.add (identifier);
else
deviceIDs.add (deviceNames[i]);
}
deviceNames.appendNumbersToDuplicates (false, false, CharPointer_UTF8 ("-"), CharPointer_UTF8 (""));


Loading…
Cancel
Save