summaryrefslogtreecommitdiff
path: root/platform/osx
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-10-29 21:25:46 +0100
committerGitHub <noreply@github.com>2018-10-29 21:25:46 +0100
commit4d9b8a98ba1bdd2bc7d80f4ab61061c07298fd15 (patch)
tree30800f17fcf1f229ce46a743320b5eb18177ba87 /platform/osx
parente647342140d8eb960b2a72d83b4b86e43aef4fc7 (diff)
parentfe93bb03fec293e3ef38c9b01dc0b10c857c1d21 (diff)
Merge pull request #23279 from marcelofg55/osx_server
Server platform works on OS X too
Diffstat (limited to 'platform/osx')
-rw-r--r--platform/osx/os_osx.h4
-rw-r--r--platform/osx/os_osx.mm4
2 files changed, 8 insertions, 0 deletions
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 6fd52f09d1..546c88e74a 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -74,8 +74,12 @@ public:
IP_Unix *ip_unix;
+#ifdef COREAUDIO_ENABLED
AudioDriverCoreAudio audio_driver;
+#endif
+#ifdef COREMIDI_ENABLED
MIDIDriverCoreMidi midi_driver;
+#endif
InputDefault *input;
JoypadOSX *joypad_osx;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 70b49805d2..e18a7d482c 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1408,7 +1408,9 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
void OS_OSX::finalize() {
+#ifdef COREMIDI_ENABLED
midi_driver.close();
+#endif
CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), NULL, kTISNotifySelectedKeyboardInputSourceChanged, NULL);
CGDisplayRemoveReconfigurationCallback(displays_arrangement_changed, NULL);
@@ -2725,7 +2727,9 @@ OS_OSX::OS_OSX() {
[NSApp sendEvent:event];
}
+#ifdef COREAUDIO_ENABLED
AudioDriverManager::add_driver(&audio_driver);
+#endif
}
bool OS_OSX::_check_internal_feature_support(const String &p_feature) {