diff --git a/src/main.rs b/src/main.rs index 0ae71a4..3a5033f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -115,6 +115,14 @@ fn main() { mode: bevy_embedded_assets::PluginMode::ReplaceDefault, }); + // Reduce power usage when unfocused + app.insert_resource(bevy::winit::WinitSettings { + focused_mode: bevy::winit::UpdateMode::Continuous, + unfocused_mode: bevy::winit::UpdateMode::reactive_low_power( + bevy::utils::Duration::from_secs(10), + ), + }); + app.add_plugins(OutFlyPlugin); app.insert_resource(prefs); app.run();