Fix macOS and other builds after #15299
Commit ammended by @akien-mga to fix more platforms.
This commit is contained in:
parent
6e2ed15ff1
commit
322cb08dd9
|
@ -114,7 +114,7 @@ Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p
|
|||
|
||||
visual_server = memnew(VisualServerRaster(rasterizer));
|
||||
|
||||
ERR_FAIL_COND(!visual_server, ERR_UNAVAILABLE);
|
||||
ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE);
|
||||
|
||||
// TODO: enable multithreaded VS
|
||||
/*
|
||||
|
|
|
@ -429,7 +429,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
attributes.antialias = false;
|
||||
attributes.majorVersion = 2;
|
||||
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;
|
||||
// can't fulfil fullscreen request due to browser security
|
||||
|
|
|
@ -1013,7 +1013,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
|
|||
backing:NSBackingStoreBuffered
|
||||
defer:NO];
|
||||
|
||||
ERR_FAIL_COND(window_object == nil, ERR_UNAVAILABLE);
|
||||
ERR_FAIL_COND_V(window_object == nil, ERR_UNAVAILABLE);
|
||||
|
||||
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
|
||||
|
||||
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];
|
||||
|
||||
ERR_FAIL_COND(context == nil, ERR_UNAVAILABLE);
|
||||
ERR_FAIL_COND_V(context == nil, ERR_UNAVAILABLE);
|
||||
|
||||
[context setView:window_view];
|
||||
|
||||
|
|
|
@ -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->init();
|
||||
|
||||
ERR_FAIL_COND(!visual_server, ERR_UNAVAILABLE);
|
||||
ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE);
|
||||
|
||||
visual_server->init();
|
||||
|
||||
|
@ -77,6 +77,7 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int
|
|||
|
||||
return OK;
|
||||
}
|
||||
|
||||
void OS_Server::finalize() {
|
||||
|
||||
if (main_loop)
|
||||
|
|
|
@ -711,7 +711,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
|
|||
|
||||
if (first) {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue