Merge pull request #82876 from bruvzg/old_xc_build_fix

[macOS] Fix ambiguous method call with older SDKs.
This commit is contained in:
Rémi Verschelde 2023-10-05 22:51:24 +02:00
commit 154d512555
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -191,7 +191,8 @@ DisplayServerMacOS::WindowID DisplayServerMacOS::_create_window(WindowMode p_mod
ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Can't create an OpenGL context."); ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Can't create an OpenGL context.");
} }
if (gl_manager_angle) { if (gl_manager_angle) {
Error err = gl_manager_angle->window_create(window_id_counter, nullptr, (__bridge void *)[wd.window_view layer], p_rect.size.width, p_rect.size.height); CALayer *layer = [(NSView *)wd.window_view layer];
Error err = gl_manager_angle->window_create(window_id_counter, nullptr, (__bridge void *)layer, p_rect.size.width, p_rect.size.height);
ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Can't create an OpenGL context."); ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Can't create an OpenGL context.");
} }
window_set_vsync_mode(p_vsync_mode, window_id_counter); window_set_vsync_mode(p_vsync_mode, window_id_counter);