diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-08-24 12:17:14 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 12:17:14 -0300 |
commit | c6b340ea98708c27cb5a5a8380ef4072ad2fa839 (patch) | |
tree | 4b0f7f0b23641f5675c5402e860c062a2673b5c1 /core/os | |
parent | 77185aaf21f6235dd7aab664d191e149390ad5ee (diff) | |
parent | 05fc12ddb631c111b96bf03d84100d270f296b21 (diff) |
Merge pull request #20712 from marcelofg55/midi_open_close
Add OS::open_midi_inputs and OS::close_midi_inputs
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/os.cpp | 12 | ||||
-rw-r--r-- | core/os/os.h | 2 |
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; } |