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.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 13264ed46e..410fea153a 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -47,7 +47,7 @@ const char *OS_Server::get_video_driver_name(int p_driver) const {
return "Dummy";
}
-void OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
+Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
args = OS::get_singleton()->get_cmdline_args();
current_videomode = p_desired;
@@ -67,14 +67,17 @@ void OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p
spatial_sound_2d_server = memnew(SpatialSound2DServerSW);
spatial_sound_2d_server->init();
- ERR_FAIL_COND(!visual_server);
+ ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE);
visual_server->init();
input = memnew(InputDefault);
_ensure_user_data_dir();
+
+ return OK;
}
+
void OS_Server::finalize() {
if (main_loop)