Skip to content

Commit

Permalink
don't run update before window creation in winit (#10741)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
mockersf authored Nov 26, 2023
1 parent 13f2749 commit 89d652b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crates/bevy_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,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
Expand Down

0 comments on commit 89d652b

Please sign in to comment.