mirror of
https://github.com/lightsoutgames/bevy_full_throttle
synced 2025-01-22 15:45:57 +00:00
fix: Actually integrate Bevy 0.15's handling for ctrlc
.
This commit is contained in:
parent
ffa9746323
commit
d8b38e9444
|
@ -12,7 +12,6 @@ edition = "2021"
|
||||||
bevy = { version = "0.15", default-features = false, features = [
|
bevy = { version = "0.15", default-features = false, features = [
|
||||||
"bevy_window",
|
"bevy_window",
|
||||||
] }
|
] }
|
||||||
ctrlc = "3"
|
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows = { version = "0.58", features = [
|
windows = { version = "0.58", features = [
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
use bevy::app::ctrlc;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use bevy::{
|
use bevy::{
|
||||||
app::{AppExit, TerminalCtrlCHandlerPlugin},
|
app::{AppExit, TerminalCtrlCHandlerPlugin},
|
||||||
|
@ -88,7 +89,8 @@ pub struct FullThrottlePlugin {
|
||||||
|
|
||||||
impl Plugin for FullThrottlePlugin {
|
impl Plugin for FullThrottlePlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.insert_resource(*self)
|
app.add_plugins(TerminalCtrlCHandlerPlugin)
|
||||||
|
.insert_resource(*self)
|
||||||
.add_systems(Startup, setup)
|
.add_systems(Startup, setup)
|
||||||
.add_systems(PostUpdate, (focus_change, exit));
|
.add_systems(PostUpdate, (focus_change, exit));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user