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.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 1c17780ad7..60f20d6009 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -29,10 +29,10 @@
/*************************************************************************/
#include "os_server.h"
+#include "core/print_string.h"
#include "drivers/dummy/audio_driver_dummy.h"
#include "drivers/dummy/rasterizer_dummy.h"
#include "drivers/dummy/texture_loader_dummy.h"
-#include "print_string.h"
#include "servers/visual/visual_server_raster.h"
#include "main/main.h"
@@ -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;
};