summaryrefslogtreecommitdiff
path: root/drivers/winmidi
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2018-08-03 21:17:33 -0300
committerMarcelo Fernandez <marcelofg55@gmail.com>2018-08-04 10:07:46 -0300
commit05fc12ddb631c111b96bf03d84100d270f296b21 (patch)
tree71763043111b98f1a70171aa385353f2882f8620 /drivers/winmidi
parent6c569c90b666c7fb773eca3948fc76ba7a160a27 (diff)
Add OS::open_midi_inputs and OS::close_midi_inputs
Diffstat (limited to 'drivers/winmidi')
-rw-r--r--drivers/winmidi/win_midi.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/winmidi/win_midi.cpp b/drivers/winmidi/win_midi.cpp
index 6da6e31b2b..63f7f13685 100644
--- a/drivers/winmidi/win_midi.cpp
+++ b/drivers/winmidi/win_midi.cpp
@@ -53,6 +53,12 @@ Error MIDIDriverWinMidi::open() {
char err[256];
midiInGetErrorText(res, err, 256);
ERR_PRINTS("midiInOpen error: " + String(err));
+
+ MIDIINCAPS caps;
+ res = midiInGetDevCaps(i, &caps, sizeof(MIDIINCAPS));
+ if (res == MMSYSERR_NOERROR) {
+ ERR_PRINTS("Can't open MIDI device \"" + String(caps.szPname) + "\", is it being used by another application?");
+ }
}
}