chore: Upgrade to Bevy 0.15.

This commit is contained in:
Nolan Darilek 2024-12-05 15:09:00 -06:00
parent b7d74b3537
commit 6ed6185ca8
2 changed files with 9 additions and 3 deletions

View File

@ -9,7 +9,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
bevy = { version = "0.14", default-features = false } bevy = { version = "0.15", default-features = false, features = [
"bevy_window",
] }
ctrlc = "3" ctrlc = "3"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]

View File

@ -1,4 +1,8 @@
use bevy::{app::AppExit, prelude::*, window::WindowFocused}; use bevy::{
app::{AppExit, TerminalCtrlCHandlerPlugin},
prelude::*,
window::WindowFocused,
};
#[cfg(windows)] #[cfg(windows)]
use windows::{ use windows::{
core::GUID, core::GUID,
@ -28,7 +32,7 @@ fn setup(mut commands: Commands) {
Power::PowerSetActiveScheme(None, Some(active)) Power::PowerSetActiveScheme(None, Some(active))
.ok() .ok()
.expect("Failed to set power scheme"); .expect("Failed to set power scheme");
std::process::exit(1); TerminalCtrlCHandlerPlugin::gracefully_exit();
}) })
.expect("Failed to set exit handler"); .expect("Failed to set exit handler");
} }