diff --git a/Cargo.toml b/Cargo.toml index 8c0208e..e33a97b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,11 +9,11 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = { version = "0.11", default-features = false } +bevy = { version = "0.12", default-features = false } ctrlc = "3" [target.'cfg(windows)'.dependencies] -windows = { version = "0.51", features = [ +windows = { version = "0.52", features = [ "Win32_Foundation", "Win32_System_Power", "Win32_System_Registry", diff --git a/src/lib.rs b/src/lib.rs index c447b0f..b5cc9a7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,7 @@ fn focus_change( mut focus: EventReader, scheme: Res, ) { - for event in focus.iter() { + for event in focus.read() { if event.focused { #[cfg(windows)] unsafe { @@ -61,7 +61,7 @@ fn focus_change( #[allow(unused_variables)] fn exit(mut exit: EventReader, scheme: Res) { - for event in exit.iter() { + for event in exit.read() { #[cfg(windows)] unsafe { Power::PowerSetActiveScheme(None, Some(&**scheme))