Change WinitPlugin defaults to limit game update rate when window is not visible (for real this time) (#11305)

# Objective

I goofed. #7611 forgot to change the default update modes set by the
`WinitPlugin`.


<ce5bae55f6/crates/bevy_winit/src/winit_config.rs (L53-L60)>


<ce5bae55f6/crates/bevy_winit/src/lib.rs (L127)>

## Solution

Change `Default` impl for `WinitSettings` to return the `game` settings
that limit FPS when the app runs in the background.
This commit is contained in:
Cameron 2024-01-15 09:53:35 -08:00 committed by GitHub
parent 839d2f8353
commit aeab690fdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,10 +52,7 @@ impl WinitSettings {
impl Default for WinitSettings {
fn default() -> Self {
WinitSettings {
focused_mode: UpdateMode::Continuous,
unfocused_mode: UpdateMode::Continuous,
}
WinitSettings::game()
}
}