diff options
author | Marcelo Fernandez <marcelofg55@gmail.com> | 2018-08-03 21:17:33 -0300 |
---|---|---|
committer | Marcelo Fernandez <marcelofg55@gmail.com> | 2018-08-04 10:07:46 -0300 |
commit | 05fc12ddb631c111b96bf03d84100d270f296b21 (patch) | |
tree | 71763043111b98f1a70171aa385353f2882f8620 /core/os | |
parent | 6c569c90b666c7fb773eca3948fc76ba7a160a27 (diff) |
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 dd783408e8..100af95ef1 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; } |