We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6e95e9 commit 691e41aCopy full SHA for 691e41a
crates/bevy_winit/src/winit_config.rs
@@ -38,8 +38,17 @@ pub struct WinitSettings {
38
39
impl WinitSettings {
40
/// Default settings for games.
41
+ ///
42
+ /// [`Continuous`](UpdateMode::Continuous) if windows have focus,
43
+ /// [`ReactiveLowPower`](UpdateMode::ReactiveLowPower) otherwise.
44
pub fn game() -> Self {
- WinitSettings::default()
45
+ WinitSettings {
46
+ focused_mode: UpdateMode::Continuous,
47
+ unfocused_mode: UpdateMode::ReactiveLowPower {
48
+ wait: Duration::from_millis(50), // 20Hz
49
+ },
50
+ ..Default::default()
51
+ }
52
}
53
54
/// Default settings for desktop applications.
0 commit comments