diff --git a/Cargo.toml b/Cargo.toml index 3b01cc9..1a65788 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,6 @@ edition = "2021" bevy = { version = "0.15", default-features = false, features = [ "bevy_window", ] } -ctrlc = "3" [target.'cfg(windows)'.dependencies] windows = { version = "0.58", features = [ diff --git a/src/lib.rs b/src/lib.rs index f8d02ed..d945794 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +use bevy::app::ctrlc; #[allow(unused_imports)] use bevy::{ app::{AppExit, TerminalCtrlCHandlerPlugin}, @@ -88,7 +89,8 @@ pub struct FullThrottlePlugin { impl Plugin for FullThrottlePlugin { fn build(&self, app: &mut App) { - app.insert_resource(*self) + app.add_plugins(TerminalCtrlCHandlerPlugin) + .insert_resource(*self) .add_systems(Startup, setup) .add_systems(PostUpdate, (focus_change, exit)); }