From aeab690fdb893b6eeb6dbadc646111ea76a5a782 Mon Sep 17 00:00:00 2001 From: Cameron <51241057+maniwani@users.noreply.github.com> Date: Mon, 15 Jan 2024 09:53:35 -0800 Subject: [PATCH] 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`. ## Solution Change `Default` impl for `WinitSettings` to return the `game` settings that limit FPS when the app runs in the background. --- crates/bevy_winit/src/winit_config.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/bevy_winit/src/winit_config.rs b/crates/bevy_winit/src/winit_config.rs index ecece207d6b3d..78168309093fb 100644 --- a/crates/bevy_winit/src/winit_config.rs +++ b/crates/bevy_winit/src/winit_config.rs @@ -52,10 +52,7 @@ impl WinitSettings { impl Default for WinitSettings { fn default() -> Self { - WinitSettings { - focused_mode: UpdateMode::Continuous, - unfocused_mode: UpdateMode::Continuous, - } + WinitSettings::game() } }