summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.cpp12
-rw-r--r--core/os/os.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 97dae05919..e90d714450 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -689,6 +689,18 @@ PoolStringArray OS::get_connected_midi_inputs() {
return list;
}
+void OS::open_midi_inputs() {
+
+ if (MIDIDriver::get_singleton())
+ MIDIDriver::get_singleton()->open();
+}
+
+void OS::close_midi_inputs() {
+
+ if (MIDIDriver::get_singleton())
+ MIDIDriver::get_singleton()->close();
+}
+
OS::OS() {
void *volatile stack_bottom;
diff --git a/core/os/os.h b/core/os/os.h
index 12c0222ad4..6f9a72d451 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -190,6 +190,8 @@ public:
virtual const char *get_audio_driver_name(int p_driver) const;
virtual PoolStringArray get_connected_midi_inputs();
+ virtual void open_midi_inputs();
+ virtual void close_midi_inputs();
virtual int get_screen_count() const { return 1; }
virtual int get_current_screen() const { return 0; }