浏览代码

Fix macOS and other builds after #15299

Commit ammended by @akien-mga to fix more platforms.
Duy-Nguyen TA 7 年之前
父节点
当前提交
322cb08dd9

+ 1 - 1
platform/haiku/os_haiku.cpp

@@ -114,7 +114,7 @@ Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p
 
 
 	visual_server = memnew(VisualServerRaster(rasterizer));
 	visual_server = memnew(VisualServerRaster(rasterizer));
 
 
-	ERR_FAIL_COND(!visual_server, ERR_UNAVAILABLE);
+	ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE);
 
 
 	// TODO: enable multithreaded VS
 	// TODO: enable multithreaded VS
 	/*
 	/*

+ 1 - 1
platform/javascript/os_javascript.cpp

@@ -429,7 +429,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
 	attributes.antialias = false;
 	attributes.antialias = false;
 	attributes.majorVersion = 2;
 	attributes.majorVersion = 2;
 	EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_create_context(NULL, &attributes);
 	EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_create_context(NULL, &attributes);
-	ERR_FAIL_COND(emscripten_webgl_make_context_current(ctx) != EMSCRIPTEN_RESULT_SUCCESS, ERR_UNAVAILABLE);
+	ERR_FAIL_COND_V(emscripten_webgl_make_context_current(ctx) != EMSCRIPTEN_RESULT_SUCCESS, ERR_UNAVAILABLE);
 
 
 	video_mode = p_desired;
 	video_mode = p_desired;
 	// can't fulfil fullscreen request due to browser security
 	// can't fulfil fullscreen request due to browser security

+ 3 - 3
platform/osx/os_osx.mm

@@ -1013,7 +1013,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
 						backing:NSBackingStoreBuffered
 						backing:NSBackingStoreBuffered
 						  defer:NO];
 						  defer:NO];
 
 
-	ERR_FAIL_COND(window_object == nil, ERR_UNAVAILABLE);
+	ERR_FAIL_COND_V(window_object == nil, ERR_UNAVAILABLE);
 
 
 	window_view = [[GodotContentView alloc] init];
 	window_view = [[GodotContentView alloc] init];
 
 
@@ -1100,11 +1100,11 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
 #undef ADD_ATTR2
 #undef ADD_ATTR2
 
 
 	pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
 	pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
-	ERR_FAIL_COND(pixelFormat == nil, ERR_UNAVAILABLE);
+	ERR_FAIL_COND_V(pixelFormat == nil, ERR_UNAVAILABLE);
 
 
 	context = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil];
 	context = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil];
 
 
-	ERR_FAIL_COND(context == nil, ERR_UNAVAILABLE);
+	ERR_FAIL_COND_V(context == nil, ERR_UNAVAILABLE);
 
 
 	[context setView:window_view];
 	[context setView:window_view];
 
 

+ 2 - 1
platform/server/os_server.cpp

@@ -67,7 +67,7 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int
 	spatial_sound_2d_server = memnew(SpatialSound2DServerSW);
 	spatial_sound_2d_server = memnew(SpatialSound2DServerSW);
 	spatial_sound_2d_server->init();
 	spatial_sound_2d_server->init();
 
 
-	ERR_FAIL_COND(!visual_server, ERR_UNAVAILABLE);
+	ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE);
 
 
 	visual_server->init();
 	visual_server->init();
 
 
@@ -77,6 +77,7 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int
 
 
 	return OK;
 	return OK;
 }
 }
+
 void OS_Server::finalize() {
 void OS_Server::finalize() {
 
 
 	if (main_loop)
 	if (main_loop)

+ 1 - 1
servers/visual_server.cpp

@@ -711,7 +711,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
 
 
 		if (first) {
 		if (first) {
 			for (int i = 0; i < total_bones; i++) {
 			for (int i = 0; i < total_bones; i++) {
-				r_bone_aabb[i].size == Vector3(-1, -1, -1); //negative means unused
+				r_bone_aabb[i].size = Vector3(-1, -1, -1); //negative means unused
 			}
 			}
 		}
 		}