mirror of
https://github.com/lightsoutgames/bevy_full_throttle
synced 2025-03-15 08:25:56 +00:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
76c64f6683 | |||
e0797633bb | |||
3eca9f067a | |||
fb63b2ba79 | |||
621578e756 | |||
d51ef53f49 | |||
4fa1e45e93 | |||
50903a8170 | |||
d8b38e9444 |
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -2,6 +2,24 @@
|
|||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## Version 0.7.4 - 2025-01-03
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- No need for *any* ctrl-c handling since Bevy already does the right thing.
|
||||
|
||||
## Version 0.7.3 - 2025-01-03
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Don't explicitly add ctrl-c-handling plugin as it is likely included in related groups.
|
||||
|
||||
## Version 0.7.2 - 2025-01-03
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Actually integrate Bevy 0.15's handling for `ctrlc`.
|
||||
|
||||
## Version 0.7.1 - 2024-12-05
|
||||
|
||||
### Miscellaneous Tasks
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "bevy_full_throttle"
|
|||
description = "Enable CPU performance mode for Bevy games"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://labs.lightsout.games/projects/bevy_full_throttle"
|
||||
version = "0.7.1"
|
||||
version = "0.7.4"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -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 = [
|
||||
|
|
13
src/lib.rs
13
src/lib.rs
|
@ -1,9 +1,5 @@
|
|||
#[allow(unused_imports)]
|
||||
use bevy::{
|
||||
app::{AppExit, TerminalCtrlCHandlerPlugin},
|
||||
prelude::*,
|
||||
window::WindowFocused,
|
||||
};
|
||||
use bevy::{app::AppExit, prelude::*, window::WindowFocused};
|
||||
#[cfg(windows)]
|
||||
use windows::{
|
||||
core::GUID,
|
||||
|
@ -29,13 +25,6 @@ fn setup(mut commands: Commands) {
|
|||
if let Some(active) = active.as_ref() {
|
||||
let scheme = DefaultScheme(*active);
|
||||
commands.insert_resource(scheme);
|
||||
ctrlc::set_handler(move || {
|
||||
Power::PowerSetActiveScheme(None, Some(active))
|
||||
.ok()
|
||||
.expect("Failed to set power scheme");
|
||||
TerminalCtrlCHandlerPlugin::gracefully_exit();
|
||||
})
|
||||
.expect("Failed to set exit handler");
|
||||
}
|
||||
}
|
||||
#[cfg(not(windows))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user