bevy/crates/bevy_winit/src
thebluefish 54f0c556f6 Fix winit control flow when re-focusing game (#12239)
# Objective

Fixes #12126

Notably this does not appear to fix the console error spam that appears
to be coming from winit, only the performance bug that occurs when
tabbing out and back into the game.

## Solution

The winit event loop starts out as `ControlFlow::Wait` by default. When
switching to `UpdateMode::Reactive` or `UpdateMode::ReactiveLowPower`,
we repeatedly update this to `ControlFlow::WaitUntil(next)`. When
switching back to `UpdateMode::Continuous`, the event loop is
erroneously stuck at the latest `ControlFlow::WaitUntil(next)` that was
issued.

I also changed how we handle `Event::NewEvents` since the `StartCause`
already tells us enough information to make that decision. This came
about my debugging and I left it in as an improvement.
2024-03-05 22:10:30 +01:00
..
accessibility.rs Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
converters.rs Add logical key data to KeyboardInput (#11400) 2024-01-22 15:25:17 +00:00
lib.rs Fix winit control flow when re-focusing game (#12239) 2024-03-05 22:10:30 +01:00
system.rs Add the ability to request a redraw from an external source (#12197) 2024-03-05 22:10:30 +01:00
winit_config.rs Add the ability to request a redraw from an external source (#12197) 2024-03-05 22:10:30 +01:00
winit_windows.rs Add the ability to request a redraw from an external source (#12197) 2024-03-05 22:10:30 +01:00