chore: Upgrade Bevy and windows dependencies.

This commit is contained in:
Nolan Darilek 2024-01-02 11:36:30 -06:00
parent 7cb62068bf
commit 465106e21c
2 changed files with 4 additions and 4 deletions

View File

@ -9,11 +9,11 @@ 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.11", default-features = false } bevy = { version = "0.12", default-features = false }
ctrlc = "3" ctrlc = "3"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
windows = { version = "0.51", features = [ windows = { version = "0.52", features = [
"Win32_Foundation", "Win32_Foundation",
"Win32_System_Power", "Win32_System_Power",
"Win32_System_Registry", "Win32_System_Registry",

View File

@ -40,7 +40,7 @@ fn focus_change(
mut focus: EventReader<WindowFocused>, mut focus: EventReader<WindowFocused>,
scheme: Res<DefaultScheme>, scheme: Res<DefaultScheme>,
) { ) {
for event in focus.iter() { for event in focus.read() {
if event.focused { if event.focused {
#[cfg(windows)] #[cfg(windows)]
unsafe { unsafe {
@ -61,7 +61,7 @@ fn focus_change(
#[allow(unused_variables)] #[allow(unused_variables)]
fn exit(mut exit: EventReader<AppExit>, scheme: Res<DefaultScheme>) { fn exit(mut exit: EventReader<AppExit>, scheme: Res<DefaultScheme>) {
for event in exit.iter() { for event in exit.read() {
#[cfg(windows)] #[cfg(windows)]
unsafe { unsafe {
Power::PowerSetActiveScheme(None, Some(&**scheme)) Power::PowerSetActiveScheme(None, Some(&**scheme))