You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Handle error when setting boot image if swap chain is not available. Skip resizing swap chain during screen creation as it's not necessary and can fail when it starts minimized.
This commit is contained in:
@@ -169,7 +169,11 @@ void RendererCompositorRD::set_boot_image(const Ref<Image> &p_image, const Color
|
||||
return;
|
||||
}
|
||||
|
||||
RD::get_singleton()->screen_prepare_for_drawing(DisplayServer::MAIN_WINDOW_ID);
|
||||
Error err = RD::get_singleton()->screen_prepare_for_drawing(DisplayServer::MAIN_WINDOW_ID);
|
||||
if (err != OK) {
|
||||
// Window is minimized and does not have valid swapchain, skip drawing without printing errors.
|
||||
return;
|
||||
}
|
||||
|
||||
RID texture = texture_storage->texture_allocate();
|
||||
texture_storage->texture_2d_initialize(texture, p_image);
|
||||
|
||||
Reference in New Issue
Block a user