Skip to content

Commit aeab690

Browse files
authored
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`. <https://github.com/bevyengine/bevy/blob/ce5bae55f64bb095e1516427a706a2622ccf2d23/crates/bevy_winit/src/winit_config.rs#L53-L60> <https://github.com/bevyengine/bevy/blob/ce5bae55f64bb095e1516427a706a2622ccf2d23/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.
1 parent 839d2f8 commit aeab690

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/bevy_winit/src/winit_config.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ impl WinitSettings {
5252

5353
impl Default for WinitSettings {
5454
fn default() -> Self {
55-
WinitSettings {
56-
focused_mode: UpdateMode::Continuous,
57-
unfocused_mode: UpdateMode::Continuous,
58-
}
55+
WinitSettings::game()
5956
}
6057
}
6158

0 commit comments

Comments
 (0)