From 9cfc48145b72014c49f47600d7e0710fa4ef8e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Sun, 26 Nov 2023 02:26:44 +0100 Subject: [PATCH] don't run update before window creation in winit (#10741) # Objective - Window size, scale and position are not correct on the first execution of the systems - Fixes #10407, fixes #10642 ## Solution - Don't run `update` before we get a chance to create the window in winit - Finish reverting #9826 after #10389 --- crates/bevy_winit/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 2291f609d0..dfae1ec0b3 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -350,11 +350,8 @@ impl Default for WinitAppRunnerState { /// `EventLoop`. pub fn winit_runner(mut app: App) { if app.plugins_state() == PluginsState::Ready { - // If we're already ready, we finish up now and advance one frame. - // This prevents black frames during the launch transition on iOS. app.finish(); app.cleanup(); - app.update(); } let mut event_loop = app