You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Print errors when calling MIDI input methods on unsupported platforms
This partially addresses #32065.
(cherry picked from commit 9c0d214776)
This commit is contained in:
committed by
Rémi Verschelde
parent
eef442f32d
commit
424d1b5fab
@@ -728,19 +728,25 @@ PoolStringArray OS::get_connected_midi_inputs() {
|
||||
return MIDIDriver::get_singleton()->get_connected_inputs();
|
||||
|
||||
PoolStringArray 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())
|
||||
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())
|
||||
if (MIDIDriver::get_singleton()) {
|
||||
MIDIDriver::get_singleton()->close();
|
||||
} else {
|
||||
ERR_PRINT(vformat("MIDI input isn't supported on %s.", OS::get_singleton()->get_name()));
|
||||
}
|
||||
}
|
||||
|
||||
OS::OS() {
|
||||
|
||||
Reference in New Issue
Block a user