summaryrefslogtreecommitdiff
path: root/platform/server/os_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/server/os_server.cpp')
-rw-r--r--platform/server/os_server.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 1069d6bbed..60f20d6009 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -68,6 +68,10 @@ void OS_Server::initialize_core() {
crash_handler.initialize();
OS_Unix::initialize_core();
+
+#ifdef __APPLE__
+ SemaphoreOSX::make_default();
+#endif
}
Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
@@ -87,7 +91,11 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int
input = memnew(InputDefault);
+#ifdef __APPLE__
+ power_manager = memnew(power_osx);
+#else
power_manager = memnew(PowerX11);
+#endif
_ensure_user_data_dir();
@@ -221,7 +229,7 @@ void OS_Server::run() {
while (!force_quit) {
- if (Main::iteration() == true)
+ if (Main::iteration())
break;
};