From dde97be4a01be41cfe89f6ce64608481df375f78 Mon Sep 17 00:00:00 2001 From: Anna Rose Wiggins Date: Mon, 11 Aug 2025 11:55:16 -0400 Subject: [PATCH] Fix static list (still only partially filled out) --- src/bin/evinfo.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/evinfo.rs b/src/bin/evinfo.rs index 4acd9ab..a9d7648 100644 --- a/src/bin/evinfo.rs +++ b/src/bin/evinfo.rs @@ -22,7 +22,7 @@ fn main() { } } -const JOYSTICK_BUTTONS: &[evdev::KeyCode] = &[ +static JOYSTICK_BUTTONS: [evdev::KeyCode; 11] = [ evdev::KeyCode::BTN_TRIGGER_HAPPY1, evdev::KeyCode::BTN_TRIGGER_HAPPY2, evdev::KeyCode::BTN_TRIGGER_HAPPY3, @@ -71,7 +71,9 @@ fn print_device(path: PathBuf, device: RawDevice, verbose: u8) { if let Ok(abs_info) = device.get_absinfo() { if abs_info.count() > 0 { println!("\tAxis Data:"); - abs_info.for_each(|info| println!("\t\t{} {}")); + for (axis, info) in abs_info { + println!("\t\t{} {}-{}", axis, info.minimum(), info.maximum()); + } } } }