Unverified Commit 9043605a by Rémi Verschelde Committed by GitHub

Merge pull request #39201 from Calinou/midi-input-unsupported-error

Print errors when calling MIDI input methods on unsupported platforms
parents cec49bd1 9c0d2147
......@@ -457,18 +457,22 @@ PackedStringArray OS::get_connected_midi_inputs() {
}
PackedStringArray list;
return list;
ERR_FAIL_V_MSG(list, vformat("MIDI input isn't supported on %s.", OS::get_singleton()->get_name()));
}
void OS::open_midi_inputs() {
if (MIDIDriver::get_singleton()) {
MIDIDriver::get_singleton()->open();
} else {
ERR_PRINT(vformat("MIDI input isn't supported on %s.", OS::get_singleton()->get_name()));
}
}
void OS::close_midi_inputs() {
if (MIDIDriver::get_singleton()) {
MIDIDriver::get_singleton()->close();
} else {
ERR_PRINT(vformat("MIDI input isn't supported on %s.", OS::get_singleton()->get_name()));
}
}
......
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