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 /platform | |
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 'platform')
-rw-r--r-- | platform/osx/os_osx.mm | 4 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 4 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 4 |
3 files changed, 2 insertions, 10 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 7bf274310d..41cfada723 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1351,8 +1351,6 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a AudioDriverManager::initialize(p_audio_driver); - midi_driver.open(); - input = memnew(InputDefault); joypad_osx = memnew(JoypadOSX); @@ -1370,6 +1368,8 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a void OS_OSX::finalize() { + midi_driver.close(); + CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), NULL, kTISNotifySelectedKeyboardInputSourceChanged, NULL); CGDisplayRemoveReconfigurationCallback(displays_arrangement_changed, NULL); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index b7b207dde1..fa8717a4b8 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1321,10 +1321,6 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int AudioDriverManager::initialize(p_audio_driver); -#ifdef WINMIDI_ENABLED - driver_midi.open(); -#endif - TRACKMOUSEEVENT tme; tme.cbSize = sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_LEAVE; diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 043902f48c..56b0c975c4 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -341,10 +341,6 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a AudioDriverManager::initialize(p_audio_driver); -#ifdef ALSAMIDI_ENABLED - driver_alsamidi.open(); -#endif - ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE); ERR_FAIL_COND_V(x11_window == 0, ERR_UNAVAILABLE); |