remove an i32 cast from is_any_key_pressed

This commit is contained in:
2025-04-17 02:25:07 +01:00
parent af5ea259e9
commit 9c53239276
+1 -1
View File
@@ -44,7 +44,7 @@ pub fn is_window_focused(target_title: &str) -> bool {
pub fn is_any_key_pressed(keys: &[u8]) -> bool { pub fn is_any_key_pressed(keys: &[u8]) -> bool {
keys.iter() keys.iter()
.any(|&key| unsafe { (i32::from(GetAsyncKeyState(i32::from(key))) & 0x8000) != 0 }) .any(|&key| unsafe { (GetAsyncKeyState(i32::from(key)) & i16::MIN) != 0 })
} }
pub fn elevate(closing: ElevationExitMethod) { pub fn elevate(closing: ElevationExitMethod) {